Actions24
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node operation deletes a specific chat message in a Telegram chat. 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 by specifying the chat ID and message ID to remove spam or irrelevant content.
- Automating message cleanup in a group chat to maintain order.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier for the target chat or username where the message to be deleted is located. |
| Message ID | Unique identifier of the message to delete within the specified chat. |
Output
JSON
result- The response from Telegram API confirming the deletion of the message.
Dependencies
- Requires Telegram API credentials (API key/token) to authenticate and authorize the request.
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' indicates the message ID might be invalid or the message was already deleted.
- Permission errors occur if the bot is not an admin or lacks delete message rights in the chat.
Links
- Telegram Bot API - deleteMessage - Official Telegram API documentation for deleting messages in chats.