Skip to main content

Destructure Telegram Context

Category: Processing

Description: When a bot interacts with a user in Telegram, it receives a "Context" object. This object contains a lot of information about the interaction, such as who sent the message, in which chat it was sent, and the content of the message. This module breaks down that complex object into individual, usable pieces of information.

Default​

Inputs​

NameTypeRequiredDescription
Telegram ContextjsontrueThe context object from a Telegram trigger

Outputs​

NameTypeDescription
DatenumberThe date the event happened
Message TexttextThe text of the message. Only available for text-based messages.
Message IDnumberThe ID of the message
Chat IDnumberThe unique ID of the chat where the message was sent
Chat TitletextThe name of the chat
Chat TypetextThe type of chat (e.g. group, private, channel)
Sender IDnumberThe ID of the user who sent the message
New Chat Member IDsnumber-arrayA list of users who just joined the chat
Left Chat Member IDnumberThe user who left the chat

Output Event Triggers​

Name
Success
Error