1
我正在製作一個電報bot api包裝,並想知道如何獲取用戶的位置。我曾經嘗試這樣做:如何獲取電報用戶位置
def test(chat):
reply_markup = {
"chat_id" : chat,
"text": "your message",
"reply_markup":
{"keyboard":
[
[{"text": "Send Your Mobile", "request_contact": True}],
[{"text": "Send Your Location", "request_location": True}]
]
}
}
和:
def func():
keyboard = [{"text":"Hello", "request_location":True}]
reply_markup = {"keyboard":keyboard, "one_time_keyboard":True}
return json.dumps(reply_markup)
做的事情提交到我的send_messages FUNC這是我從有:https://www.codementor.io/garethdwyer/building-a-telegram-bot-using-python-part-1-goi5fncay
我會怎麼做呢?