Contents
- What Discord allows: 14 days and 100 messages
- Which approach fits your situation?
- 1. Check permissions
- 2. Run a purge
- 3. Filter by member, bots or text
- 4. Remove one account's spam across several channels
- 5. Empty a channel completely: clone instead of delete
- 6. Keep purges traceable in the log
- Prevent spam instead of cleaning up
- Checklist
- Common mistakes
- FAQ
A spam bot posted scam links for two minutes, an argument got out of hand, or a test channel is full of bot output. Deleting messages one by one takes forever, and everyone keeps reading in the meantime. If you want to bulk delete messages on Discord, you need a purge: a command that removes many messages at once.
In this guide you learn which limits Discord sets, how to use Lizbot to hit only the right messages and when it is smarter to clone a channel instead of clearing it out. You also set up logging so every bulk deletion stays traceable.
What Discord allows: 14 days and 100 messages
Discord itself has no button in the app to delete as many messages as you like at once. You can delete them one at a time through the menu on the message. If you hold Shift while clicking the bin icon, the confirmation prompt is skipped. That is enough for a few messages, not for waves of spam.
Bulk deletions run through bots, and Discord sets two fixed limits for them:
- At most 100 messages per run. For more, you run the command several times.
- Only messages younger than 14 days. No bot can bulk delete older messages, only one at a time.
These limits are not a restriction of one particular bot, they apply to all of them. Lizbot also keeps a small safety margin on age and only takes messages younger than about 13.5 days. That way the command does not fail on messages sitting right at the limit.
Which approach fits your situation?
| Situation | Best approach |
|---|---|
| Spam from the last few minutes in one channel | /channel purge with an amount |
| One member spammed in a channel | /channel purge with the member filter |
| A spam account posted in many channels | Ban with message history deleted, or /mod softban |
| Bot output in a test or commands channel | /channel purge with the bots filter |
| A channel should be completely empty, old messages included | Clone the channel and delete the old one |
| Spam should not stay up in the first place | AutoMod spam filter with earlier messages deleted |
1. Check permissions
For Lizbot to delete, the Lizbot role needs the Manage Messages and Read Message History permissions in the affected channel. If one of them is missing, for example because a channel override takes it away, the command finds nothing or fails. Check this in the channel settings under Permissions.
You control who may use the command in two places. By default, Discord only shows /channel to members with the Manage Channels permission. If you add your Mod roles in the dashboard under Settings, section Permissions, the moderation commands show up for everyone, but Lizbot only lets these roles and members with moderation permissions use them. You can also adjust the visibility of individual commands in Discord under Server Settings, Integrations, Lizbot. How to split team roles sensibly is covered in the guide to building a Discord moderation team.
2. Run a purge
Go to the channel you want to clean up and type:
```
/channel purge amount:50
```
The amount option is required and ranges from 1 to 100. Lizbot looks at the last 100 messages in the channel, sorts out everything older than the 14-day limit and then deletes up to the amount you asked for. Only you see the confirmation of how many messages were deleted, so the channel stays free of extra bot messages.
If Lizbot finds no matching messages, you get a note that Discord only lets bots delete messages younger than 14 days. That is also the most common reason for an empty result.
Important: purge makes no difference between normal and pinned messages. If a pinned message falls within the range, it is deleted too. In channels with important pins, you are better off working with filters or a small amount.
An overview of all moderation commands with examples is in the guide Discord moderation commands.
3. Filter by member, bots or text
Without filters, purge hits everything, including the explanation a moderator just posted. With filters, you delete precisely. Lizbot offers three options you can combine:
- `member`: only messages from a specific member
- `contains`: only messages that contain a specific text, upper and lower case don't matter
- `bots`: set to True, only messages from bots
A few everyday examples:
```
/channel purge amount:100 member:@Spammer
/channel purge amount:30 bots:True
/channel purge amount:100 contains:discord.gg
/channel purge amount:100 contains:http
```
The third example clears out invites to other servers, the fourth all messages with a link. There is no separate filter for links or attachments. With contains and part of the address, though, you get almost the same result for links. Messages that consist only of an image or a file without text are best caught with member.
Keep in mind how the filter works: Lizbot always searches the last 100 messages of the channel and filters within them. If a member spammed 300 messages ago, a purge with member no longer finds those messages. For one account's scattered spam, the next step works better.
4. Remove one account's spam across several channels
Purge only works in the channel where you run the command. If a spam account posted in ten channels, the fastest way to delete its messages is together with the ban:
- Ban in Discord: in the ban dialog you choose how far back Discord should delete the account's messages, up to seven days. This applies to all channels.
- Ban through Lizbot: in the dashboard under Moderation, tab General, you set under Delete messages on ban how many days of history (0 to 7) are deleted with every
/ban. - `/mod softban`: kicks the member and deletes their messages from the last seven days. The account can come back afterwards through an invite. This fits when you want to clean up without banning for good, for example with a hijacked account of a real member.
Bans through Lizbot and /mod softban are recorded as a case with a number and reason, unlike a plain purge. A ban directly through the Discord dialog creates no Lizbot case, but with logging active it shows up in the log (event Ban). More on the case system is under Moderation. After a raid with many accounts, the bulk action described in the guide to raid protection helps.
If a hacked account posts images in many channels, Lizbot can detect and clean this up automatically. More on this in the guide Stop image scams from hacked accounts.
5. Empty a channel completely: clone instead of delete
If you want a channel to be completely empty, including messages older than 14 days, purge is the wrong tool. Hundreds of runs still would not reach the old messages. Cloning is faster and complete:
- Right-click the channel in the channel list and choose Clone Channel.
- Give it the same name. Discord copies permissions, topic and the other channel settings, but no messages.
- Move the new channel to the position of the old one.
- Delete the old channel through Edit Channel and Delete Channel.
Before you delete the old channel, keep three things in mind:
- New channel ID: to Discord, the clone is a different channel. Everywhere the old channel was set, you have to select the new one, for example as log channel, welcome channel or target of a ticket panel. Go through the modules in the dashboard that use this channel.
- What does not come along: pinned messages, threads, webhooks and links to individual messages are gone with the old channel. Repost important pins in the new channel.
- Rewind (anti-nuke): if a team member deletes several channels in a short time, Rewind can step in (in the dashboard under Moderation, tab Rewind). At the Strict sensitivity, two deleted channels within one minute are already enough. Cloning a single channel does not trigger it; before a big cleanup, check the limits under Advanced limits. How Rewind works is explained in the guide Discord anti-nuke.
If you want to save the content first, a backup helps. On the Studio plan, Lizbot also saves messages in backups, up to 1000 per channel. Details are in the guide to Discord backups.
6. Keep purges traceable in the log
Bulk deletions are a powerful tool, and that is exactly why your team should be able to see later what happened. The basic setup is covered in the guide Setting up Discord logs; here it is about the settings for bulk deletions. Lizbot writes a dedicated event to the log for this:
- Open the Logging module in the dashboard and switch on Logging enabled.
- Under Layout, choose whether everything goes to one channel, per area or per event.
- With Create channels, Lizbot creates a private "Logs" category that only admin and mod roles can see.
- Under Events (with the Per area layout, under Areas, area Messages), check that Bulk delete and Message deleted are switched on.
On a bulk deletion, Lizbot then posts how many messages were deleted and in which channel. This applies to every bulk deletion, whether through /channel purge, another bot or the spam cleanup of Lizbot's AutoMod. Lizbot logs individually deleted messages from members with content and attachments, as long as Lizbot has seen the message since its last restart. With the View Audit Log permission, the entry also shows who deleted it. Lizbot does not log deleted bot messages individually.
There are two limitations you should know about. The bulk delete entry names the amount and the channel, but not which team member ran the command. And channels you add under Ignored channels do not appear in the log at all for message events, bulk deletions included. A simple team rule closes the first gap: whoever runs a larger purge posts a short note in the mod channel explaining why. You can find all logging features under Logging.
Prevent spam instead of cleaning up
The best purge is the one you don't need. In the dashboard under AutoMod, tab Spam & raid, the spam filter detects members who send too many or identical messages in a short time. With the switch Also delete the earlier spam messages, Lizbot also cleans up the rest of that member's messages from the time window on a hit, not just the last one. Spam filter, word filter, invite and link filters and phishing protection are already included in the Free plan. How to set it all up is covered in the guide to setting up Discord AutoMod.
Checklist
- Lizbot has Manage Messages and Read Message History in the channel
- mod roles are added in the dashboard under Settings, Permissions
- your team knows
/channel purgewith the filtersmember,containsandbots - under Moderation it is set how many days of history a ban deletes
- logging is active, Bulk delete and Message deleted are switched on
- before cloning a channel, it is clear which modules use it
Common mistakes
- Purging without filters: team replies and pinned messages disappear too. Use
memberorbotswherever you can. - Trying to purge old messages: no bot can bulk delete messages older than 14 days. Clone the channel or delete them one by one.
- Purge for scattered spam: one account in many channels is a case for a ban or softban with history deleted, not for ten purges.
- Not reconnecting a cloned channel: log or welcome messages otherwise go nowhere, because the old channel no longer exists.
- Log channel among the ignored channels: if you ignore the mod channel, you won't see deletions there later.
FAQ
Can I delete all messages in a channel at once?
Not with purge if messages older than 14 days are included. Clone the channel with Clone Channel and delete the old one. The clone keeps name, permissions and settings, but is empty.
Why does purge delete fewer messages than I entered?
Lizbot searches the last 100 messages and only takes those younger than the 14-day limit that match your filters. If there are fewer than the amount you asked for, only that part is deleted.
Can deleted messages be restored?
No, Discord deletes them permanently. With logging active, you usually see the content of individually deleted member messages in the log. For bulk deletions, it only shows the amount and the channel. Lizbot saves messages in backups on the Studio plan. What can still be traced after deletion is covered in the guide Seeing deleted Discord messages.
Does the purge command cost anything?
No. /channel purge with all filters, /mod softban, the ban setting, logging and the spam filter with earlier messages deleted are included in the Free plan. Only messages in backups require Studio.
Can I delete only images or files?
There is no separate filter for attachments. If the files come from one account, use the member filter. You can reach links with contains and part of the address, such as http.
Matching Lizbot features
- Moderation and AutoMod for DiscordEvery warning, timeout and ban gets a case number and a reason. Your team sees at a glance what has already happened with a member.
- Logging for Discord: messages, roles and voiceLizbot logs deleted and edited messages, joins, roles, voice, channels and moderation in log channels of your choice.
More guides
- Moderation & safety9 min read
Set up Discord AutoMod: block bad words, spam, links and phishing
Set up Discord AutoMod: word filter, spam protection, links, invites and phishing. Discord's own AutoMod vs. a bot AutoMod compared, with recommended settings.
Read more - Moderation & safety8 min read
Set up Discord verification: button, captcha and rules acceptance
Set up Discord verification with a button, captcha or email code, have members accept your rules and keep alt accounts out. Step by step with Lizbot.
Read more - Moderation & safety8 min read
Set up Discord raid protection: protect your server from raids, spam and nukes
Set up Discord raid protection: detect join waves, lockdown, alt accounts, anti-nuke and backups. Protect your server and respond right in an emergency.
Read more
Let Liz handle it for you
Invite Lizbot, set it up in the dashboard, done. The Free plan stays free.
Rather ask first? In the support Discord

