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

22 lines
674 B
Python
Raw Normal View History

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