messages_bulk_delete
messages_bulk_delete
Section titled “messages_bulk_delete”Category: messages
Bulk-delete 2-100 messages from a channel in one request. DESTRUCTIVE — IRREVERSIBLE.
When to use
Section titled “When to use”- Sweep spam / raid messages.
- Bulk cleanup after a moderation incident.
When NOT to use
Section titled “When NOT to use”- Single message → use
messages_delete. - Messages older than 14 days — Discord rejects with 400.
| Field | Type | Required | Description |
|---|---|---|---|
channel_id | string | yes | Channel containing the messages |
message_ids | array | yes | Message IDs to delete (2-100, all must be ≤14 days old) |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
confirm | boolean | no | Must be true to actually perform the destructive action |
Returns
Section titled “Returns”\{deleted, channel_id, count\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
deleted | boolean | yes | |
channel_id | string | yes | Discord channel ID (snowflake) |
count | integer | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | yes |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | yes (__confirm:true required) |