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
2020-11-07 13:18:24 +01:00

27 lines
926 B
Python

from telegram import Update
from telegram.ext import CallbackContext, CallbackQueryHandler
from callbackQuery.create import create
from callbackQuery.data import data
from callbackQuery.edit import edit
from callbackQuery.new import new
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)
elif update.callback_query.data == "create":
create(update, context)
elif update.callback_query.data.startswith("edit_"):
edit(update, context)
elif update.callback_query.data.startswith("reason_"):
reason(update, context)
callback_query_handler = CallbackQueryHandler(callback_query)