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.
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.
!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
after/before cap at 300 messages, between at 1000. after aliases: since, upto, up, af. before aliases: b4, bf. between aliases: range, btw, rng.
Reactions
reaction, reacts, react, r.
Purging your own messages
selfpurge, purgeme. To let a role purge messages generally without giving them Manage Messages:
Scheduled purges
Automatically clear a channel on a repeating interval — useful for spam channels, temporary event channels, or anywhere that shouldn’t accumulate history.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.