Bot. Get Message#

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

Connection[Link] The connection object to the bot. The variable name in this property must match the variable name in the "Connection" property of the "Bot. Create Connection" block from the Telegram group that was previously used to connect to the Telegram bot.
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;
  • ChatId - chat id;
  • From - the name of the User from whom the message was received;
  • Text - the text of the message;
  • 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, IsVoice). For example: $TMessage.IsPhoto - if equal to $true, then there is a photo in the message.
Callback

[Boolean] If enabled, the message contains callback data (button press). Available properties:

  • IsCallback - if enabled, then this is a callback;
  • CallbackData - a string with the data of the pressed button (this data is set in the dictionary in the "Bot. Send Message" block);
  • Callback - the callback object.
Error Handling Level

Select the error handling level. Possible values:

  • "Default" - by 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 level of messages that the blocks will output during operation. Possible values:

  • "Default" - by default;
  • "Release" - output is disabled;
  • "Debug" - output of main information;
  • "Detailed" - output of 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.