我已经尝试在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)
答案 0 :(得分:0)
首先,检查您的导入。
其次,使用其他方法,而不是尝试