11

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:

Sumithran
  • 6,217
  • 4
  • 40
  • 54
Seyfi
  • 1,832
  • 1
  • 20
  • 35

3 Answers3

19

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)

Dmitry
  • 2,057
  • 1
  • 18
  • 34
7

Try updating the message with editMessageText method and empty markup.

ariaby
  • 852
  • 7
  • 12
2

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

Mohsen K
  • 257
  • 4
  • 10