Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telegram import Update, Bot, InlineKeyboardButton, InlineKeyboardMarkup
- from telegram.ext import Updater, CommandHandler, MessageHandler, Filters,CallbackQueryHandler
- from credits import bot_token
- bot = Bot(token=bot_token)
- updater = Updater(token=bot_token, use_context=True)
- dispatcher = updater.dispatcher
- def start(update, context):
- context.bot.send_message(update.effective_chat.id, "Это бот для расписания! Ничего не забывай!")
- keyboard = [
- [InlineKeyboardButton("Расписание", callback_data='table'),
- InlineKeyboardButton("Доска", callback_data='desk')]
- ]
- update.message.reply_text('Функции:', reply_markup=InlineKeyboardMarkup(keyboard))
- def button(update,context):
- query = update.callback_query
- query.answer()
- if query.data == "table":
- pass
- elif query.data == "desk":
- pass
- button_handler = CallbackQueryHandler(button)
- start_handler = CommandHandler("start", start)
- dispatcher.add_handler(start_handler)
- updater.start_polling()
- updater.idle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement