Actions32
- Messages Actions
- Channels Actions
- Guilds Actions
- Users Actions
- Webhooks Actions
Messages → Delete Message
AI-generatedOverview
This node provides enhanced integration with Discord's API, allowing users to perform a wide range of operations on Discord resources. Specifically, for the Messages resource and the Delete Message operation, it enables deleting a specific message from a given channel in Discord.
This is useful in scenarios where you want to automate moderation tasks, clean up messages programmatically, or manage content dynamically within Discord channels. For example, a bot could automatically delete messages containing prohibited content or remove outdated announcements.
Properties
| Name | Meaning |
|---|---|
| Channel ID | The unique identifier of the Discord channel where the message exists. |
| Message ID | The unique identifier of the message to be deleted within the specified channel. |
Output
The output JSON contains the response from the Discord API after attempting to delete the message. Typically, a successful deletion returns an empty object or confirmation status indicating the message was removed.
No binary data is output by this operation.
Example output JSON:
{}
Dependencies
- Requires an active connection to Discord via an API key credential (OAuth2 or similar) configured in n8n.
- Uses an external service called "N8N Tools API" for subscription and API key validation before executing Discord API calls.
- The node depends on the Discord API endpoints for message management.
Troubleshooting
- Invalid Subscription or API Key: If the N8N Tools API validation fails with 401 or 403 errors, ensure that your API key credential is valid and has an active subscription.
- Unknown Resource or Operation: Errors indicating unknown resource or operation suggest misconfiguration of the node parameters.
- Message Not Found or Permission Denied: Discord API may return errors if the message ID or channel ID is incorrect, or if the bot lacks permissions to delete messages in the channel.
- Rate Limits: Frequent deletions might hit Discord rate limits; handle such errors by implementing retries or delays.