Go to documentation repository
Page History
...
The TELEGRAM object sends events presented in the table. Procedure The procedure is started when the corresponding event appearsevent occurs. The format of the event procedure for a mail message.
Code Block |
---|
OnEvent("TELEGRAM","_id_","_event_") |
...
Event | Description | Comment |
ERROR | Error of message Message sending .error | The error<> parameter contains the test text description of the error. |
Format The format of the operator to describe actions with a mail message is following:
Code Block |
---|
DoReact("TELEGRAM","_id_","_command_" [,"_parameters_"]); |
List The 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|||
longtitude<> | Geolocation longtitude | |||
latitude<> | Geolocation latitude | |||
address<> | Geolocation text address | |||
SENDPHOTO — send photo | photo<> | Full path to the image file | ||
caption<> | Text comment to the fileFile caption | |||
chat_id<> | Chat identifier | |||
bot_id<> | Bot identifier | |||
longtitude<> | Geolocation longtitude | |||
latitude<> | Geolocation latitude | |||
address<> | Geolocation text address |
Examples of calling the command for sending a message to Telegram by using a macro:
Code Block |
---|
OnEvent("MACRO","3","RUN") //run macro 3 { //Sending with chat_id & bot_id from object settings: DoReact("TELEGRAM",1,"SEND","text<Hello world>"); //SettingExplicit 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>"); //Sending geolocation with chat ID and bot ID: DoReact("TELEGRAM",1,"SEND","text<Hello world>,chat_id<828752651>,bot_id<809045046:AAGtKxtDWu5teRGKW_Li8wFBQuJ-l4A9h38>",longtitude<37.3428359>,latitude<55.6841654>,address<ITV>); } |
Overview
Content Tools