Is there any way to pass additional data values from custom keyboard layout buttons?
I need to pass a value like ID that they are hidden from user:
{"Button1",{"id":1}} ...
Is there any way to pass additional data values from custom keyboard layout buttons?
I need to pass a value like ID that they are hidden from user:
{"Button1",{"id":1}} ...
2
Answers
That’s not currently possible. It would be a great addition to the API, though, in order to separate the text you see from the value you send back to the bot.
You cannot do it with custom keyboards, but it is possible with callback_data param of InlineKeyboard
When user will press inline button with callback_data specified message received by bot will be type of CallbackQuery with data param containing your data from the button.