There is a bot that processes the Location request from the user. If a server receives a message of this type, the bot can return the distance between the coordinates that came from the user and a certain point on the map ( точка_А ).
Expanding functionality: the bot can return the distance to точка_B or точка_А . Question: how to distinguish the server, the distance to A or B user wants?
I mean that attaching geolocation to a message, you can not add text or media to this message. Clean location and all. If you could send a message that contained two types:
LocationandText, it would be much easier - just add the lineточка_Аto geolocation and that's it.
Can it be done in the following way?
msg_1: the user sends a message of typeText:"локация";msg_2: the bot returns two buttons:точка_Аandточка_B;msg_3: the user selects the desired button;msg_4: bot returns:"отправь свое местонахождение";msg_5: the user is sending theLocation;- the server counts the distance;
msg_6: the bot returns the distance.
The next question is: how to get the data msg_3 at the time of the calculation of the distance using Webhook ?