|
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
|
|
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, MessageHandler, Filters
|
|
|
|
|
|
def start(update, context):
|
|
update.message.reply_text(
|
|
"Вітаю! Я ваш чат-бот для навігації по альбому. Оберіть опцію:",
|
|
reply_markup=main_menu_keyboard()
|
|
)
|
|
|
|
|
|
def main_menu_keyboard():
|
|
keyboard = [[InlineKeyboardButton('Фотографії', callback_data='photos')],
|
|
[InlineKeyboardButton('Відео', callback_data='videos')],
|
|
[InlineKeyboardButton('Аудіо', callback_data='audio')]]
|
|
return InlineKeyboardMarkup(keyboard)
|
|
|
|
|
|
def main_menu(update, context):
|
|
query = update.callback_query
|
|
query.answer()
|
|
query.edit_message_text(
|
|
text="Оберіть опцію:",
|
|
reply_markup=main_menu_keyboard()
|
|
)
|
|
|
|
|
|
def photos(update, context):
|
|
query = update.callback_query
|
|
query.answer()
|
|
query.edit_message_text(text="Ось ваші фотографії: Посилання на галерею")
|
|
|
|
def videos(update, context):
|
|
query = update.callback_query
|
|
query.answer()
|
|
query.edit_message_text(text="Ось ваші відео: Посилання на відео")
|
|
|
|
def audio |