I created a keyboard in my bot, but it sends right after clicking, but I need it to work as standard: until I clicked send, it will not send, for example:

клавиатура: 1 2 3 + 4 5 6 - 7 8 9 * 0 . / 

How to make the characters appear in the string after clicking, and not immediately sent to the bot?

  • It seems that the api of such buttons implies immediately sending, i.e. no way to fix it. - Denis

1 answer 1

In the current version of the Telegram Bot API (Bot API 3.0, 05/18/2017) this is not implemented. You can use the built-in keyboard for this, performing your calculations and after pressing the button = send a message with the result of the calculations to the user.

Unlike with custom reply keyboards, it’s not a message.


Also on the topic - Telegram Bot API custom keyboard, sending multiple values ​​in one message