Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
teleexit/callbackQuery/main.py

28 lines
926 B
Python
Raw Normal View History

from telegram import Update
from telegram.ext import CallbackContext, CallbackQueryHandler
2020-11-07 12:16:52 +01:00
from callbackQuery.create import create
from callbackQuery.data import data
from callbackQuery.edit import edit
from callbackQuery.new import new
2020-11-07 12:16:52 +01:00
from callbackQuery.reason import reason
from commands.start import start
def callback_query(update: Update, context: CallbackContext):
if update.callback_query.data == "home":
start(update, context)
elif update.callback_query.data == "new":
new(update, context)
elif update.callback_query.data == "data":
data(update, context)
2020-11-07 12:16:52 +01:00
elif update.callback_query.data == "create":
create(update, context)
elif update.callback_query.data.startswith("edit_"):
edit(update, context)
2020-11-07 12:16:52 +01:00
elif update.callback_query.data.startswith("reason_"):
reason(update, context)
callback_query_handler = CallbackQueryHandler(callback_query)