Answer the question
In order to leave comments, you need to log in
How to handle pressing the bot's keyboard button in the VK API?
How to handle keyboard presses via longpoll? Now I just look at the text of the message and compare it with the button names. Other bots have buttons on the keyboard with the same text, and the bot reacts to them differently. I cannot find this information.
Answer the question
In order to leave comments, you need to log in
use the payload property
, for example, for one button, payload will be {"button": "1"}
, for the second - {"button": "2"}
, while the text of the buttons can be the same .
More details here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question