Anti-nuke in depth
What counts as a destructive action, the window and threshold, the punishment, and the trust list.
What it watches
Anti-nuke reads the audit log to find out who performed each destructive action: channel deletions, role deletions, member bans and member kicks. Actions are counted per actor. When one actor passes max_actions inside window_seconds, the bot applies the configured action to that actor and posts to the log channel.
Settings and defaults
- enabled
- Off by default. Nothing is punished until you turn it on.
- max_actions
- Default 3. Actions allowed inside the window before punishment.
- window_seconds
- Default 30.
- action
- timeout (default), kick, ban or none. none only logs.
- timeout_minutes
- Default 60, used when action is timeout.
Set with /security antinuke or on the Security page. /security status shows the current values.
Trust list
/security trust role:<role> or user:<user> exempts them; /security untrust removes them. The server owner is always exempt, and the bot ignores actions performed by itself. Put your bulk-cleanup tools and your most trusted admin on the list, and nobody else. The trust list is never copied by Copy Settings.
Limits
The bot needs View Audit Log, and to time out, kick or ban it needs the matching permission and a role above the actor. It cannot stop an actor whose role is above the bot's, which is why the bot role should sit high but below the owner. Discord's audit log can lag a few seconds under heavy load; the window is wide enough to still catch a burst.