我尝试使用下面的 pyrogram API 代码获取实时位置更新,但在位置变量中获取 None。
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()