我正在使用这个库:python电报机器人 我想用where命令跟踪现场位置。 首先,我已经发送了实时位置,但我不知道如何在几分钟后使用/where命令跟踪位置。到目前为止,我所拥有的是:
def where(update, context):
message = None
if update.edited_message:
message = update.edited_message
else:
message = update.message
location = message.location.latitude, message.location.longitude
context.bot.send_message( chat_id=update.message.chat_id, text=str(location))
dispatcher.add_handler(MessageHandler(Filters.location, where))
问题是,自从发送位置后,每次移动时,它都会返回更新的坐标,而不是执行/where命令时
目前没有回答
相关问题 更多 >
编程相关推荐