Skip to main content

Permissions and limit

The command user needs Manage 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 by bots, 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

Also works: .purge @member 20 · .purge links 50

.purge — 2

Also works: .purge mentions 25

.purge [args...]

Also works: .purge @member 20 · .purge links 50 · .purge contains invite 30 · .purge mentions 25
Message deletion cannot be undone from Headless. Verify channel, filter, and amount first; filtered scans are bounded by the runtime.

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

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.
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.
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.

Syntax and examples

.purge — 1