Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram bot: How do I hide inline keyboard ? PHP

I made a telegram bot with an inline keyboard.(via InlineKeyboardMarkup) I like to hide (or make it one-time) keyboard after user response. How can I do that in PHP?

Here is a view of my bot:

like image 997
Seyfi Avatar asked Jun 18 '16 14:06

Seyfi


3 Answers

Try updating the message with editMessageText method and empty markup.

like image 152
ariaby Avatar answered Nov 11 '22 12:11

ariaby


There is method editMessageReplyMarkup. You can transfer empty inline_keyboard param. But it's may not working on some devices (i have problem with iphone, for problem devieces you can edit markup to "thanks" button, and after remomeve it)

like image 28
Dmitry Avatar answered Nov 11 '22 13:11

Dmitry


actually by getting the message ID and using deleteMessage you can make the keyboard disappear.

here is the description >> Telegram Bot ApI i hope this help you

like image 2
Mohsen K Avatar answered Nov 11 '22 13:11

Mohsen K