Bulk delete messages
bulk_delete_messagesDelete up to 100 recent messages in a Discord channel, optionally filtered by author or text. Previews the action first and requires a confirmation token to proceed.
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 |
|---|---|---|---|
| channel | Yes | Channel name or ID. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| count | No | How many recent messages to scan. Default 50. | |
| from_author | No | Only delete messages whose author name matches this. | |
| contains | No | Only delete messages containing this text. | |
| dry_run | No | ||
| confirm_token | No |