如何使用带航迹图的电报发送用户的位置?

时间:2020-07-21 08:53:57

标签: python telegram

我已经尝试在Google中搜索此内容。但是我找不到答案。我想通过机器人发送用户的位置信息。这是最终版本(不起作用):

markup_request = ReplyKeyboardMarkup(resize_keyboard=True).add(
    KeyboardButton('Send your contact ☎️', request_contact=True)
).add(
    KeyboardButton('Send your location ?️', request_location=True)
)

@dp.message_handler(commands=['location'])
async def message_for_start(message: types.Message):
    await message.reply('Location', reply_markup=markup_request)

1 个答案:

答案 0 :(得分:0)

首先,检查您的导入。 其次,使用其他方法,而不是尝试 或 。原因是更新aigram库。