Actions30
- Message Actions
- User Actions
- Channel Actions
- Guild Actions
- Emoji Actions
- Analytics Actions
- Moderation Actions
- Backup Actions
- DM Actions
Overview
This node operation allows bulk deletion of multiple messages in a specified Discord channel within a guild (server). It is useful for moderators or administrators who need to quickly remove a batch of messages by providing their IDs. For example, it can be used to clean up spam or unwanted content efficiently by deleting up to 100 messages at once.
Use Case Examples
- Deleting multiple spam messages in a Discord channel by specifying their message IDs.
- Removing a batch of outdated announcements or notifications from a channel.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) where the messages are located. |
| Channel ID | The ID of the channel within the guild where the messages to be deleted are located. |
| Message IDs | Comma-separated list of message IDs to delete in bulk. |
| Additional Options | Optional parameters for filtering or modifying message operations, though not specifically used in bulk delete. |
Output
JSON
success- Indicates if the bulk delete operation was successful.deletedCount- Number of messages that were deleted.deletedIds- Array of IDs of the messages that were deleted.
Dependencies
- Discord API accessed via discord.js library with a bot token credential
Troubleshooting
- Ensure the bot has the necessary permissions to manage and delete messages in the specified channel.
- Verify that the Guild ID and Channel ID are correct and that the channel belongs to the specified guild.
- The bulk delete operation cannot delete more than 100 messages at once; if more are provided, an error is thrown.
- If a message ID does not exist or the bot cannot access it, the deletion might fail or be partial.
- Common error messages include 'Channel not found' if the channel ID is invalid or inaccessible, and 'Cannot delete more than 100 messages at once' if the message ID list is too long.
Links
- Discord API Bulk Delete Messages - Official Discord API documentation for bulk deleting messages in a channel.