# Bot. Edit Message

Changing a message in the chat.

<table data-header-hidden><thead><tr><th width="245" valign="top"></th><th width="319" valign="top"></th></tr></thead><tbody><tr><td valign="top">Connection</td><td valign="top">[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.</td></tr><tr><td valign="top">Chat ID</td><td valign="top">[Number] Chat ID. This value can be obtained from the "Bot. Send Message" block in the "Message" property - $TMessage.ChatId.</td></tr><tr><td valign="top">Message ID</td><td valign="top">[Number] Message ID. This value can be obtained from the "Bot. Send Message" block in the "Message" property - $TMessage.Id.</td></tr><tr><td valign="top">Text</td><td valign="top">[Text] New text for the message or media message title.</td></tr><tr><td valign="top">Buttons</td><td valign="top">[Dictionary] A dictionary of buttons that will be sent along with the message. The key of the dictionary is the button name, and the value of the dictionary is the callback data. For example: @{ "Back"="butBack"; "Forward"="butForward" }. The values "butBack" and "butForward" will be returned in the $TMessage.CallbackData property. More details are described in the "Callback" property of the "Bot. Get Message" block.</td></tr><tr><td valign="top">Number of Button Columns</td><td valign="top">[Number] If the value is empty, the buttons will be arranged in a single row. If a value is specified, the buttons will be arranged in the specified number of columns.</td></tr><tr><td valign="top">Media Message Title</td><td valign="top">If enabled, the title of the media message (file, image) will be changed. In this case, the Chat ID and Message ID must point to such a message in the chat. Otherwise, the text of the message will be changed.</td></tr><tr><td valign="top">Disable Notification</td><td valign="top">When enabled, the delivery notification will not be sent.</td></tr><tr><td valign="top">Disable Preview</td><td valign="top">When enabled, link previews are disabled.</td></tr><tr><td valign="top">HTML Formatting</td><td valign="top">When enabled, formatting using HTML tags can be used in the text. For example: &#x3C;b>Bold text&#x3C;/b>.</td></tr><tr><td valign="top">Number of Attempts</td><td valign="top">[Number] The number of attempts when a connection error occurs with the server.</td></tr><tr><td valign="top">Message</td><td valign="top"><p>[Link] Returns the object of the modified message. Available properties:</p><ul><li>Id - message ID;</li><li>ChatId - chat ID;</li><li>From - the username from which the message was sent;</li><li>Text - the text of the message;</li><li>Type - textual designation of the message type;</li><li>IsFile - indicates whether there is a file in the message (the type can be more accurately determined using the properties IsDocument, IsPhoto). For example: $TMessage.IsPhoto - if equal to $true, then there is a photo in the message.</li></ul></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/telegram/bot.-redaktirovat-soobshenie-telegrambotedittext.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
