Receiving photos and location data from Telegram

Hi, i’m working on a Telegram chatbot using Botpress but i’m having a hard time understanding how to receive images and location data sent by users.

If i try to print the received JSON with


i get:

  • {“type”:“text”,“text”:""} In case of a text message
  • {“type”:“text”} In case of photos or location data

It appears that the payload is classified as “text” regardless of what the user sent, and is empty if the message is anything other than text. I guess the raw data sent by Telegram is processed somewhere else by Botpress.

I tried to look for the Telegram module in the source code but, according to Github history, it was removed on the 4th of august as part of some changes in how channels are handled.

How should i go about retrieving raw data sent by Telegram to my bot?
I’m still new to this, so i apologize if i’m missing something obvious.

P.S.: I should mention that the location data is sent by users with Telegram’s “Location” attachment.