Answer the question
In order to leave comments, you need to log in
How to get geolocation from a message in VK API?
I added a "Send my location" button to my bot.
I can't get a location. I only get this:
[25-12-2021 01:35:23] event.__dict__ {'raw': [4, 267, 17, 288411144, 1640388924, '', {'title': ' ... '}, {'geo': '8YHhhQ3K', 'geo_provider': '4'}, 0], 'from_user': True, 'from_chat': False, 'from_group': False, 'from_me': False, 'to_me': True, 'attachments': {'geo': '8YHhhQ3K', 'geo_provider': '4'}, 'message_data': None, 'message_id': 267, 'timestamp': 1640388924, 'peer_id': 288411144, 'flags': 17, 'extra': None, 'extra_values': {'title': ' ... '}, 'type_id': None, 'type': <VkEventType.MESSAGE_NEW: 4>, 'text': '', 'random_id': 0, 'title': ' ... ', 'user_id': 288411144, 'message_flags': {<VkMessageFlag.CHAT: 16>, <VkMessageFlag.UNREAD: 1>}, 'message': '', 'datetime': datetime.datetime(2021, 12, 24, 23, 35, 24)}
{'geo': '8YHhhQ3K', 'geo_provider': '4'}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question