How to use Rasa telegram custom buttons?

Hello, i am developping a bot and i want to link it with telegram. I want to use custom button in order to send location(venue) , i saw in the documentation that its possible with the custom arguments but there is no more information about how to use it or examples. It will be great if someone could help me with an example !

I don’t have example but where you get stuck? Do you get anything to work?

not yet

i want a button to send location in the documentation they give this for example

utter_giraffe_sticker:
 - text: Here's my giraffe sticker!
   custom:
     sticker: "https://github.com/TelegramBots/book/raw/master/src/docs/sticker-fred.webp"

but nothing for location

@Juste anything :sob: ?

Telegram API defines like this

Telegram Bot API

Location
This object represents a point on the map.

Field	Type	Description
longitude	Float	Longitude as defined by sender
latitude	Float	Latitude as defined by sender
horizontal_accuracy	Float number	Optional. The radius of uncertainty for the location, measured in meters; 0-1500
live_period	Integer	Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
heading	Integer	Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
proximity_alert_radius	Integer	Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
ChatLocation
Represents a location to which a chat is connected.

Field	Type	Description
location	Location	The location to which the supergroup is connected. Can't be a live location.
address	String	Location address; 1-64 characters, as defined by the chat owner

And found this, any help?

Getting Started With RASA-ChatBot And Telegram | by Manaan Ansari | Medium

unfortunatly no I want to send a button for which when the user presses it, sends me its location. I thought that the custom argument in the rasa documentation allowed to do it, am I right?

Ok, see this

Inline Bots

and this

Telegram Bot API

and this

Telegram Bot API

by chance do you know how to implement it with rasa ?

Not directly, it looks like you need a custom actions for this. I can try later, also I have never tried Rasa telegram connection so will try it too

ok let me know, i will search on my side too rasa integration with telegram is very easy but , having some buttons is complicated more for custom

hello, i am still stuck could anyone help me ? @nik202 anything ?

Hi and sorry for later reply @M_R_LY. Unfortunately I never worked on Telegram, else definitely you get my solution, sorry on this MJ.

do you know something about the documentation and how to use it here Telegram

or someone ?

@M_R_LY confirm me, are you able to integrate rasa with telegram?

yes but i have problem with the buttons i used the exemples in the documentation but i dont have engough for the location custum button

Hello, i am still blocked if anyone can help please @ChrisRahme anything ?

I want a button that when the user click on it it send the user’s location i saw that its possible to do it with some keyboardbutton but i am having trouble with it

Hi, still struggling at it i saw this link Getting location - #7 by JiteshGaikwad by @JiteshGaikwad i am looking for the same thing but for telegram connector.

@M_R_LY Hello, sorry for getting back to you late. If there is any resources I encountered I will try share with you about your use case i.e Telegram. Currently, I personally not implemented this use case.

hello, no problem, am stilll trying to figure it out i have been able to send a button but throught the api now i want to do it using the dispatcher here is the request code that i want to transform into json

r = requests.post(
        #     "https://api.telegram.org/bot14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5JzAs/", 
        #     json={'method':'sendMessage', 'chat_id':"xxxxxxx", 'text':'Hello',
        #     'reply_markup':{'keyboard':[[{ "text": "Location", "request_location": True }]], "one_time_keyboard" : True}})

how to transfom the json part in order to send it via the dispatcher : dispatcher.utter_message(json_message=jsonaa)