Permissions and limit
The command user needsManage Messages; Headless also needs Manage Messages. Configure the maximum in Dashboard → Moderation → Max purge; the runtime default is 500. Requests above the maximum are rejected.
Prefix filters
Delete all messages, a member’s messages, or filter bybots, links, images, invites, embeds, mentions, or contains <text>. If a member filter has no amount, the prefix scans that member’s deletable messages in the channel; other uses default to the configured limit.
.purge — 1
.purge @member 20 · .purge links 50
.purge — 2
.purge mentions 25
.purge [args...]
.purge @member 20 · .purge links 50 · .purge contains invite 30 · .purge mentions 25
Slash command
/purge accepts an optional amount, member, and all, bots, links, invites, images, or embeds filters. It does not include the prefix command’s text or mentions filters.
/purge
/purge
.purge — 2
Steps
1
Choose channel and filter
Check the current channel; the prefix command has no channel selector.
2
Set an explicit bound
Use a smaller amount for filtered scans and verify the server maximum.
3
Review the result
Inaccessible messages or messages subject to Discord limits may remain.
Deletion limits
Old and pinned messages
Old and pinned messages
Headless skips pinned messages and messages older than 14 days. Discord does not allow bulk deletion for older messages; check the skipped count in the result.
Filtered search window
Filtered search window
A prefix filter with an amount scans a bounded window of recent messages, up to 1,500. The exception is
.purge @member without an amount: it scans that member’s deletable messages until it reaches messages older than 14 days. If a bounded filter does not find enough matches, review the channel before rerunning with a smaller amount.Case and log entry
Case and log entry
A completed prefix operation creates a case and schedules its Logs event. Slash records a Logs event but does not create the case made by the prefix route. Access or API failures can leave messages undeleted; the summary does not guarantee every matching message was removed.
