Client. Receive Message (TelegramClientReceived)#

Receives a message from the queue. If there are no messages in the queue, an error is generated.

Connection[Link] Client connection object. The variable name in this property must match the variable name in the "Connection" property of the "Client. Create Connection" block from the Telegram group that was previously used to connect the Telegram client.
Wait for MessageWhen enabled, the block will wait for new messages. Otherwise, an error will be generated in the absence of a message.
Message

[Link] Returns the message object. Available properties:

  • Id - message id;
  • Date - date;
  • From - sender of the message;
  • To - recipient of the message;
  • FromId - Id of the user who sent the message;
  • Title - chat title;
  • Text - message text;
  • Type - textual designation of the message type;
  • IsFile - indicates whether there is a file in the message (the type can be more precisely determined using the properties IsDocument, IsPhoto). For example: $TMessage.IsPhoto - if equal to $true, then there is a photo in the message.
Error Handling Level

Select the error handling level. Possible values:

  • "Default" - default;
  • "Ignore" - errors are ignored;
  • "Handle" - errors are handled.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Message Level

Select the message level that blocks will output during operation. Possible values:

  • "Default" - default;
  • "Release" - output is disabled;
  • "Debug" - outputs main information;
  • "Detailed" - outputs detailed information.

If "Default" is selected, the value from the "Start" block of this diagram will be used.

Error Text[Text] Returns detailed information about the error in case of incorrect execution of the block's work.