Cleaning and locking channels
Delete messages, empty a channel, lock or hide it, set a slow mode, and keep channels clean.
On this page
This guide gathers the commands that act on channels themselves: erasing messages, emptying a channel, locking or hiding it, slowing the conversation down.
In short
+clear 50: deletes the channel's last 50 messages;+lock/+unlock: locks or reopens the channel;+slowmode 10s: one message every 10 seconds per member;+renew: empties the channel completely.
Deleting messages
+clear 50deletes the channel's last 50 messages;+clear 20 @memberonly deletes that member's messages, among the latest;+clearalone deletes as many as the limit allows.
The limit is 500 messages per command. +clear limit 1000 changes it; this command needs a higher level than +clear, so a moderator can't raise their own limit.
If the moderation logs are on, the deleted messages are sent there in a file.
Messages older than 2 weeks
Discord doesn't allow erasing messages older than 2 weeks in one go. To empty an old channel, use +renew.
Emptying a channel in one go
+renew deletes the channel and recreates it identically, empty: same name, same position, same permissions. The bot's settings that pointed to it (logs, welcome channels…) follow the new channel. +renew #general targets another channel.
To protect a channel that must never be emptied (the rules, for example), one of the bot's owners adds it to the list: +norenew add #rules. +norenew shows the list, +norenew del #rules removes a channel.
Locking or hiding a channel
+locklocks the channel you're in: nobody can write in it any more (or join it, for a voice channel).+unlockreopens it.+hidehides it: nobody sees it any more.+unhidemakes it visible again.- You can target other channels, several at once, or a whole category:
+lock #announcements #general. +lockall,+unlockall,+hidealland+unhidealldo the same on every channel of the server, during a raid for example.
You keep the floor (and the view) in the channel where you type the command.
How it works
These commands change the @everyone permission: a role with its own permission on the channel keeps its access. Discord refuses to lock or hide some of the server's onboarding channels: the bot sets a slow mode there instead.
Slow mode
Slow mode forces a delay between two messages of the same member.
+slowmode 10s: one message every 10 seconds (1m,2h… up to 6 hours);+slowmode 1m #generaltargets another channel;+slowmode offremoves it.
It only applies to text channels.
Keeping channels clean
The bot can erase by itself the moderation (sanction) and snipe commands, and its own answers:
+autodelete moderation commande ondeletes the command's message as soon as it is done;+autodelete moderation reply ondeletes the bot's answer after 5 seconds,reply 15safter 15 seconds (10 minutes at most);- replace
moderationwithsnipefor snipe commands, andonwithoffto stop.
Everything is off by default.
If it doesn't work
+cleardoesn't delete everything: messages older than 2 weeks can't be erased in one go; use+renew.- A member can still write in a locked channel: one of their roles has its own permission to write in that channel.
+renewrefuses a channel: it is in the+norenewlist.
Every command
Each command of this guide, with its arguments, its default level and examples: Message clearing, Renew, Channel locking, Slow mode and Auto-delete.