我尝试使用下面的pyrogram API代码获取实时位置更新,但在位置变量中没有得到任何更新。
from pyrogram import Client
from pyrogram import filters
app = Client("my_account",api_id=API_ID,api_hash=API_HASH)
@app.on_message(filters.location)
async def location(client, message):
print("Location received...")
print(message.location)
app.run()
发布于 2021-05-31 01:55:41
你想获取location对象吗?
message.location.latitude
message.location.longitude
https://docs.pyrogram.org/api/types/Location#pyrogram.types.Location
https://stackoverflow.com/questions/65251705
复制相似问题