Bulk delete messages
bulk_delete_messagesDelete multiple recent Discord messages in one action, with optional filters by author or text. A preview shows what will be removed, requiring confirmation to execute.
Instructions
Delete many recent messages at once (2 to 100), optionally filtered by author or text. Discord cannot bulk delete messages older than 14 days. Safe to call directly: the first call returns the exact list it would remove plus a confirm_token; repeating the call with the token deletes them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many recent messages to scan. Default 50. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| channel | Yes | Channel name or ID. | |
| dry_run | No | ||
| contains | No | Only delete messages containing this text. | |
| from_author | No | Only delete messages whose author name matches this. | |
| confirm_token | No |