Guide/Protect your server/Clearing up after a punishment
Clearing up after a punishment — Discord Bot Guide
After a timeout, quarantine or ban, the offender's recent messages are removed automatically.
Quick answer
Tune the sweep
!security set cleanup.hours 2
!security set cleanup.actions timeout,quarantineAsk the guide
Step by step
The mess outlives the punishment
Whatever got somebody timed out, quarantined or banned is usually still on screen afterwards, and a moderator deleting it by hand is the slowest part of handling an incident. Sweet removes the last hour of that member's messages automatically.
!security set cleanup.enabled off
!security set cleanup.hours 2
!security set cleanup.actions timeout,quarantine,ban| Action | How it is cleared | Reach |
|---|---|---|
Ban | Discord deletes the messages itself as part of the ban | Every channel, including ones the bot cannot see |
Timeout | Sweet sweeps recent channels | Channels where Sweet has Manage Messages and Read Message History |
Quarantine | Same sweep | Same |
Two limits are Discord's, not ours: bulk deletion cannot touch anything older than 14 days, and pinned messages are left alone. The sweep runs in the background at the lowest priority, so it never delays the punishment itself or a raid being contained — the action lands first and the tidying follows.
Every sweep is recorded as a security.cleanup event with the number of messages removed, so it shows up in !logs search like anything else.
Copy and try
Tune the sweep
!security set cleanup.hours 2
!security set cleanup.actions timeout,quarantineStill stuck? Ask in the support server.