telegram_edit_message
Edit an existing text message in a Telegram channel by replacing its content with new text. Requires bot as original sender with edit permissions.
Instructions
Edit an existing TEXT message in a Telegram channel.
Use this tool to modify the content of a previously published TEXT message. IMPORTANT: This only works for text messages. If the message contains a photo, use edit_message_caption instead.
The bot must be the original sender of the message and have edit permissions.
Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. Must be the same channel where the original message was sent. message_id: The unique identifier of the message to edit. This is returned when you publish a message. new_text: The new text to replace the existing message content. Supports formatting based on parse_mode. parse_mode: Text formatting mode. Options: 'Markdown', 'HTML', or 'None'. Default is 'Markdown'. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'.
Returns: A dictionary containing message_id, chat_id, date, edit_date, text, and link. If response_format='markdown', returns formatted text content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_text | Yes | ||
| channel_id | Yes | ||
| message_id | Yes | ||
| parse_mode | No | Markdown | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||