Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
For example, you can try
...
def question(message):
keyboard = types.InlineKeyboardMarkup(row_width=2)
a = types.InlineKeyboardButton(text="Ответ", callback_data="get_answer")
keyboard.add(a)
bot.send_message(chat_id, "Вопрос", reply_markup = keyboard)
@bot.callback_query_handler(func=lambda call: call.data == 'get_answer') #call: call.data == 'some_data'
def callback_get_answer(call):
if call.message:
bot.send_message(chat_id, "Ответ", reply_markup = "")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question