Go to documentation repository
Documentation for Intellect 4.11.0-4.11.3. Documentation for other versions of Intellect is available too.
Previous page Next page
The TELEGRAM object corresponds to the Telegram bot system object.
The TELEGRAM object sends events presented in the table. Procedure is started when the corresponding event appears.
OnEvent("TELEGRAM","_id_","_event_")
Event | Description | Comment |
ERROR | Error of message sending. | The error<> parameter contains the test description of the error. |
Format of operator to describe actions with mail message is following:
DoReact("TELEGRAM","_id_","_command_" [,"_parameters_"]);
List of commands and parameters for the TELEGRAM object is given in the table:
Command – command description | Parameters | Description |
"SEND" – send mail message. | text<> | Message text |
chat_id<> | Chat identifier | |
bot_id<> | Bot identifier | |
"SEND_RAW" – send e-mail with parameters | photo<> | Full path to the image file |
caption<> | Text comment to the file | |
chat_id<> | Chat identifier | |
bot_id<> | Bot identifier |
Examples of calling the command for sending a message to Telegram by macro:
OnEvent("MACRO","3","RUN") //run macro 3 { //Sending with chat_id & bot_id from object settings: DoReact("TELEGRAM",1,"SEND","text<Hello world>"); //Setting chat_id & bot_id in the command: DoReact("TELEGRAM",1,"SEND","text<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>"); //Sending image file with explicit chat ID and bot ID setting: DoReact("TELEGRAM",1,"SENDPHOTO","caption<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>,photo<G:\\1.jpg>"); }
Overview
Content Tools