Answer the question
In order to leave comments, you need to log in
How to make python-telegram-bot buttons appear sequentially?
I need to do the following:
On command, a button appears *Press it* => The next button appears with its own designations.
What I already have:
import requests
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton, InputTextMessageContent, ParseMode
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler, InlineQueryHandler
import logging
***
def button(bot, update):
query = update.callback_query
query.edit_message_text(text="Выбран номер: {}".format(query.data))
def use(bot, update):
keyboard =
reply_markup = InlineKeyboardMarkup(keyboard)
update.message.reply_text('Пожалуйста выберите:', reply_markup=reply_markup)
***
def main():
dp.add_handler(CommandHandler("use", use))
dp.add_handler(CallbackQueryHandler(button))
if __name__ == '__main__':
main()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question