I am currently using RASA Open Source to create a telegram chatbot. I’ve integrated Telegram as instructed by the documentation. Now, I would like to access some of the data that the telegram api provides for user messages. However, when I use the tracker to get the latest message in my actions, I don’t have that information available. Is there any way to access them in my actions?
Hi @alextdnreb, if you want to send along extra information from the incoming message, I would recommend extending the TelegramInputChannel class. There is already a get_metadata function that is called in the input channel, which by default does not do anything. If you write a class that inherits from TelegramInputChannel and have it return the entire user message as metadata, it will send all of the information along to the action server.
Hello, I just need to get (imperiously) the username, something like …
chat_id = update.message.chat_id
first_name = update.message.chat.first_name
last_name = update.message.chat.last_name
in the context of actions.py
Should I really extend the get_metadata () function in channel.py?
How do I later transmit that data to actions.py?
on the other hand, do I have to do a specific intent /start for telegram (i.e. can’t I unify everything in action_session_start used for facebook?