Telegram bot: How do I send message with inline keyboard and hide custom keyboard simultaneously?

Alexander Trakhimenok picture Alexander Trakhimenok · Jun 16, 2016 · Viewed 24.7k times · Source
  • Step 1: Send user a message with ReplyKeyboardMarkup with few buttons (for example ["Yes", "No"])
  • Step 2: If user click one of the buttons (for example "Yes") I want to display a message with inline keyboard and hide the buttons sent at step 1.

Is it possible to do? The message has just single reply_markup property and can be either InlinkeKeyboardMarkup or ReplyKeyboardHide. The only way to do that I see is to send 2 messages (first to hide keyboard and 2nd with inline keyboard) but that would not be best solution from user experience point of view. I'm OK to do couple of request but want to have just 1 message visible to user.

Any thoughts?

Answer

ihoru picture ihoru · Jun 16, 2016

It's impossible right now. Telegram Bot API currently allows sending only one type of keyboard: inline or simple (including KeyboardHide and other).