I managed to get the users current location by creating a request that adds a key "share location" to the keyboard. However, I don't want to keep pressing a button each time my location should be updated. Therefore I want to be able to track the users live location. But I can't seem to achieve it.
When I share my live location in the telegram chat I'm able to detect this in my program and fetch the current location:
@bot.message_handler(content_types=['location'])
def handle_location(message):
location = [message.location.latitude, message.location.longitude]
However, the program does this only once. I want to be able to update the location with a function without having to ask the user to share their location again. I can't find anything about this in the documentation.
If anyone has proof that it can't be done I'd be glad to hear it. Otherwise, I would like some help.