Prune messages
Delete up to 99 recent messages from a channel in one go with /prune. Handy for cleaning up spam, raids or a conversation that got out of hand.
On this page
/prune deletes a batch of recent messages from the channel you run it in. Use it to sweep away
spam, a raid or an argument without deleting messages one by one. There's nothing to set up on
the dashboard: it works as soon as the bot has the right permissions.
Before you start#
Commands#
/prune <amount> Admins & command roles · Manage MessagesRemoves a given amount of previous messages from the current channel!
/prune needs Administrator or a role you've given the prune command under
Command roles. Discord also hides it from members without
Manage Messages. To show it to a role without that permission, change it in
Server Settings → Integrations → Farm Sim Game.
How it works#
/prune always works on the channel you run it in.
/pruneEnter how many of the latest messages to delete in amount, from 1 to 99.
Only you see the bot's reply. It says "Messages have been pruned from this channel." when it's done.
Limits#
- 1 to 99 messages per run. Run it again to delete more.
- 14 days. Discord doesn't let bots bulk delete messages older than two weeks. The bot skips those, so if some of the latest messages are older, fewer are deleted than you asked for.
- It deletes messages from everyone, including bots and pinned messages. You can't pick one member's messages.
If you've set a Message Updates Log on Server logs, each
prune is logged as "N Messages Purged", with up to 10 of the deleted messages shown. Every
use of /prune is also listed in your command history.
Examples#
Clear the last 20 messages after a spam attack:
/prune amount:20Pruning removes the mess, not the cause. Mute or ban the spammer with the warn system first, or they'll just post again.
Troubleshooting#
"I do not have permission to prune in this channel. Please fix the permissions and try again."#
Give the bot's role Manage Messages in Server Settings → Roles.
"There was an error trying to prune messages in this channel!"#
The bot can't read or delete messages in this channel. Check its channel permissions for View Channel, Read Message History and Manage Messages.
Fewer messages were deleted than I asked for#
Some of them were older than 14 days. Discord doesn't allow bulk deleting those, so delete them by hand.
I can't see /prune#
You need Manage Messages, or a server admin needs to allow your role in Server Settings → Integrations → Farm Sim Game.