Actions24
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node operation deletes a specific chat message in Telegram. It is useful for managing and moderating chat content by removing unwanted or outdated messages. For example, a bot can automatically delete messages containing inappropriate content or clear messages after a certain event.
Use Case Examples
- Deleting a message in a group chat by specifying the chat ID and message ID.
- Removing a message sent by the bot after a user interaction is completed.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier for the target chat or username of the target channel where the message to be deleted is located. |
| Message ID | Unique identifier of the message to delete within the specified chat. |
Output
JSON
json- The JSON response from Telegram API after attempting to delete the message, indicating success or failure.
Dependencies
- Telegram API authentication credentials (API key)
Troubleshooting
- Ensure the chat ID and message ID are correct and the bot has permission to delete messages in the chat.
- Common error: 'message to delete not found' occurs if the message ID is invalid or the message is too old to delete.
- If the bot lacks admin rights in the chat, deletion will fail. Grant appropriate permissions to the bot.
Links
- Telegram Bot API - deleteMessage - Official Telegram API documentation for deleting messages.