F. Rojas
F. Rojas

Reputation: 1

Is there an effective way to hide an inline keyboard with python telegram bot?

I am developing a python telegram bot app, and need to close or hide an inline keyboard with a set of InlineKeyboardButton, once the user clicks on one of them, because if any button is clicked later, my app is not in the same context and the response is not appropriate.

I did not find a comprehensive way to make this. I saw how it can be done with custom keyboards and one time use parameter. How could I handle this with inline keyboards?

Upvotes: 0

Views: 5955

Answers (1)

newsha
newsha

Reputation: 1438

You can use editMessageReplyMarkup method.

Use this method to edit only the reply markup of messages.

Just omit reply_markup parameter. This will effectively hide/delete your inline keyboard.

Upvotes: 1

Related Questions