X
X
xxxfdd2020-01-03 13:16:45
Python
xxxfdd, 2020-01-03 13:16:45

How can I substitute my telegram id here instead of message.location?

I have a request for geodata from a person, but I need that when a person clicks on the "View geolocation" button, a label is sent to him on the map where I am.

Here, a label is sent on the map of a specific user who clicked on the button, but I need my geolocation to be sent.

@dp.message_handler(content_types=["location"])
async def location(message):
    if message.location is not None:
        print(message.location)
        print("latitude: %s; longitude: %s" % (message.location.latitude, message.location.longitude))

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question