Run the internal service command by built-in  WEB server NodeJS. A service function used by MyChat internal mechanisms.

 

Syntax

procedure mNodeCommand(const sCmd, sData: string);

 

Parameters and return values

Parameter

Type

Value

sCmd

string

command;

sData

string

command parameters.

 

Example

The procedure used in a script for integration with Telegram, the event OnRequestByREST, script "Telegram".

 

The script detects that a user sent not a text but file or image to Telegram bot, and then transmits request data to NodeJS WEB server.


mNodeCommand('GetTelegramAttach', sBody);


NodeJS downloads a file or image, then sends a private message of type MSG_TYPE_FILE or MSG_TYPE_IMAGE for MyChat user — support service operator.
 

See also

Integration with Telegram

MyChat events

Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation