Tell me, please, how best to read the geolocation coordinates of the user in the telegram bot Thank you in advance!
1 answer
First, you need to determine the type of Messsage object received by your bot. If the Location type, then you work with its fields longitude and latitude - these are the coordinates transmitted by the user.
You can read the documentation :
Message object
Location Type
- Thank! Tell me more, how to determine the type? - Juluichitai
- Correctly as described in the documentation or implemented in the library, which is used to write the bot. What are you writing on? - Anatol
|