Skip to main content
purge deletes recent messages. On its own it takes an amount; with a subcommand it filters by almost anything you’d want. Requires Manage Messages. Aliases: clear, rm, c.
Discord will not let any bot bulk-delete messages older than 14 days. Purge skips those rather than failing, so a purge of 100 in a quiet channel may delete fewer than 100 messages.
Anywhere you see [users] or <members | roles>, you can name more than one — separate them with commas (@a, @b, @c), or just space them apart when names don’t need it (@a @b). The message count can go anywhere in the argument, quoted or not.

By author

cleanup (aliases botclear, clean, bc) is the one you want most often — it removes bot messages and messages that look like commands to other bots, which clears the aftermath of a bot-spam session in one go.

By content

All content matching is case-insensitive.
A search term can contain any words, spaces included — you don’t need quotes. Only a bare number at the very end is ever read as the amount, so !purge contains x for iphone searches for the whole phrase; add a number after it to also cap how many messages are scanned. Quote the term only if you specifically need a trailing number to be part of it (!purge contains "iphone 15").

By attachment type

files catches every attachment type — images and music are the narrower ones for just pictures or just audio.

By position

These take message IDs or links. after/before cap at 300 messages, between at 1000. after aliases: since, upto, up, af. before aliases: b4, bf. between aliases: range, btw, rng.
Right-click a message → Copy Message Link, and paste that. You don’t need the raw ID.

Reactions

Strips every reaction from the last N messages without deleting the messages themselves. Aliases: reaction, reacts, react, r.

Purging your own messages

Aliases: selfpurge, purgeme. To let a role purge messages generally without giving them Manage Messages:
Requires Manage Roles and Manage Messages to configure.

Scheduled purges

Automatically clear a channel on a repeating interval — useful for spam channels, temporary event channels, or anywhere that shouldn’t accumulate history.
Requires Manage Messages and Manage Channels. Aliases for add: schedule, create, timer. Aliases for view: info, check. Aliases for list: ls, scheduled, schedules, panel. Aliases for remove: delete, del, rm, cancel.

Flags

All flags are optional and combine — by default a message must match every flag you set (--or switches that to any).
For a channel you’d rather wipe completely than trim, !nuke clones it and deletes the original — instant, no 14-day limit, but it loses all history and the channel gets a new ID. Scheduled nukes are covered on the Channels page.

Command reference

Every command requires Manage Messages unless noted.