Answer the question
In order to leave comments, you need to log in
Text responses when clicking on InlineKeyboardButton (pyTelegramBotAPI)?
Hello, how to implement text responses (send message) when clicking on InlineKeyboardButton?
@bot.message_handler(commands=['start'])
def any_msg(message):
keyboard = types.InlineKeyboardMarkup()
callback_button = types.InlineKeyboardButton(text="1", callback_data="1")
keyboard.add(callback_button)
bot.send_message(message.chat.id, "Я – сообщение из обычного режима", reply_markup=keyboard)
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