Using the purge command to remove messages
The purge command is a level 2+ (trusted) command to remove messages matching one or more criteria.
Last updated
The purge command is a level 2+ (trusted) command to remove messages matching one or more criteria.
Last updated
This command is available in two modes. The shortcut mode and the custom mode. The shortcut mode allows you to remove certain types of messages easily, while the custom mode lets you choose messages to remove in a much more powerful and specific fashion.
General syntax: +purge [type of removal] <number of messages to search>
Remove message that contains embeds:
Remove messages with attachments linked to them.
Remove messages containing images.
Remove any message. For example, to remove the last 10 messages, use +purge all 10
Remove messages from a specific user. For example, to remove the last 10 messages of @User, type +purge user @User 10
Remove messages containing a substring (at least 3 chars long). For example, to remove every message containing OwO, type +purge contains OwO
Remove messages from bots and bot commands. To remove messages from bots only, use +purge bot
while you can use +purge bot + 35
to remove messages that either are from bots or start with + in the last 35 messages.
Delete messages containing custom emojis.
Remove reactions from messages that have them. This does not remove messages, just reactions.
Need more power to remove messages. Behold the custom mode!
This command uses a powerful "Command Line" syntax. Most options support multiple values to indicate 'any' match. If a value has spaces, it must, as always, be quoted.
The messages are by-default deleted only if all options are met (AND). You can use the --or
flag that will delete messages if any of the conditions is met.
The following options are valid. They all take arguments.
You can also use the following flags, with no arguments.
Here are some examples to get you started.
+purge custom --emoji --starts "lol" --starts "xd"
Remove messages that contains custom emojis and start with lol or xd.
+purge custom --starts "Bonjour" --ends "au revoir" -- or
Remove messages that start with "Bonjour" or end with "au revoir".
+purge custom --reactions
Remove messages that have been reacted to.
+purge custom --embeds --bot
Remove messages from bots that also contain embeds.