Based on Telegram Bot API documentation Telegram Bot API I created an action where I want to request a user location. But unfortunately I don’t get anything on a user side after this action call.
from rasa_core_sdk import Action
class ActionGetLocation(Action):
def name(self):
return "action_get_location"
def run(self, dispatcher, tracker, domain):
dispatcher.utter_custom_message({"text": "Can i get your location please?",
"reply_markup": { "keyboard": [[{ "text": "Send Location", "request_location": "true"}]]}})
return []
Does anyone know or had any experience how to request a user location in Telegram? Or any other messenger platforms?
I faced this question before. And I figured we just need an intent and train it in nlu.yml. I forget how is the text and you can print the full_message of the latest message and find the ‘text:’ and copy the format to the nlu.yml.
I maybe it is too late to help you but hope it can help others in the future.