A
A
Archermystery2022-03-03 11:58:08
Python
Archermystery, 2022-03-03 11:58:08

How to change keyboard in pyTelegramBotAPI telegram message?

How to change keyboard in pyTelegramBotAPI telegram message?
I have code:

markup_inline = types.InlineKeyboardMarkup()
item_1 = types.InlineKeyboardButton(text='-', callback_data='1')
item_yes= types.InlineKeyboardButton(text='да', callback_data='yes')
markup_inline .add(item_1,item_yes)
bot.send_message(message.chat.id,'1',reply_markup=markup_inline)

I want that when they click on the "yes" button in the '1' button, the inscription changes to 'yes'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2022-03-03
@Archermystery

you can use the edit_message_reply_markup method .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question