Skip to main content

Overview

Anti-nuke is a separate, more serious layer than the rest of the automod: it watches for a burst of destructive actions by one account and answers once the account crosses the limit. Every protection has its own switch, limit, window, action, alert channel and trusted accounts and roles. Everything starts off.
Turning this on requires Administrator, it can strip roles or ban accounts automatically.
An anti-nuke alert in the staff alerts channel: Rage Quit lost its roles, the channels can be put back and there is a Restore button

In Discord: the alert when an account deletes three channels in ten seconds.

The Anti-raid and nuke page with the list of protections and their switches

Dashboard → Moderation → Anti-raid & nuke: each protection with its own switch.

Protections

When the same account crosses the limit of a protection inside its window, the protection does the action you chose: only alert (alert), take all their roles (quarantine, the default), kick (kick) or ban (ban). A bot is always banned, unless the action is only alert. The server owner, Petto, anyone trusted and any account whose role is at or above Petto’s are never touched. A quarantine keeps the roles Discord manages (booster, integrations). After a protection answers, what the same account still does in that window is undone too, without a second alert. When Discord’s audit log is late, Petto reads it again a moment later, and an entry is never counted twice. Dangerous permissions for Anti Role Changes are Administrator, Manage Server, Manage Roles, Manage Channels, Manage Webhooks, Ban, Kick, Timeout and Mention Everyone. When it answers, the roles go back to how they were before the first edit. Anti Channel Changes watches Manage Channels, Manage Roles, Manage Webhooks, Manage Messages and Mention Everyone given to @everyone, and puts back the old name, topic and permissions. Anti Webhook Spam leaves the webhooks of bots and apps (PluralKit, interactions, followed channels) alone.
Servers that used the old single switch keep it working: the protections you have not tuned yet follow it. Save a protection to tune it on its own, then turn the old switch off.

Dashboard

Anti-raid & nuke in the dashboard shows every protection in one list, like a switchboard: open a row to change its limit, window, action, alert channel and trusted accounts and roles. The Shared settings tab sets who is trusted by all of them and the default alert channel, and the Panic & owner tab has panic mode, owner only, the trusted admins and the owner’s DM. Anti Raid and Anti Alt (accounts joining) are in the same list.
The Anti Delete Channels row opened: 2 actions in 10 seconds, take all their roles, alerts in staff-alerts

Dashboard → Moderation → Anti-raid & nuke: Anti Delete Channels opened with its limit, window, action, alert channel and trusted roles and accounts.

The Anti Raid row opened: 8 joins in 10 seconds start a lockdown, and Anti Alt kicks accounts under 7 days

Dashboard → Moderation → Anti-raid & nuke: Anti Raid opened, with Anti Alt in the same row.

The Shared settings tab with the Admin role and a bot trusted and alerts in staff-alerts

Dashboard → Moderation → Anti-raid & nuke → Shared settings: who every protection trusts and the default alert channel.

The Panic & owner tab: panic mode on with 2 protections in 10 minutes and a 30 minute lockdown, the DM to the owner on and kira as trusted admin

Dashboard → Moderation → Anti-raid & nuke → Panic & owner: panic mode, the owner's DM, owner only and the trusted admins.

Commands

Every !antinuke command (alias !an) needs Administrator. With owner only on, only the owner and the trusted admins can change it.
liam runs antinuke status: 8 of 18 protections active, each with its limit and action

In Discord: every protection with its limit and action, panic mode, the DM and owner only.

liam turns Anti Ban on with 3 in 10 seconds and the ban action, alerts in staff-alerts

In Discord: Anti Ban tuned to ban after 3 bans in 10 seconds.

liam trusts the Moderators role

In Discord: a role trusted by every protection.

liam stops trusting the Stats Helper bot

In Discord: an account that is no longer trusted.

The trusted list: the Stats Helper bot and the Admin role

In Discord: the trusted accounts and roles.

liam turns panic mode on: 2 protections in 10 minutes lock the server for 30 minutes, and a raid starts it too

In Discord: panic mode turned on.

liam turns the DM to the owner off and Petto shows both settings

In Discord: the owner's DM turned off.

liam, the owner, makes chu a trusted admin

In Discord: a trusted admin named by the owner.

liam removes kira from the trusted admins

In Discord: a trusted admin removed.

The trusted admins list with kira

In Discord: the trusted admins.

kira opens the anti-nuke log: three events, one that can be restored and one already restored

In Discord: the last times a protection acted, and what can still be restored.

kira restores event 3: general, memes and announcements are recreated and Rage Quit gets 2 roles back

In Discord: event 3 put back: three channels rebuilt and the roles given back.

The protection is one of ban, kick, bot_add, webhook, channel_create, channel_delete, role_create, role_delete, role_assign, unban, emoji_delete, emoji_create, guild_update, role_update, channel_update, mention_everyone, webhook_spam and prune. The limit goes from 1 to 50 and the window from 2 to 600 seconds. Options can be written in order or with their name, like --limit 3.

Panic mode

With panic mode on, when several protections act within a few minutes (2 in 10 minutes by default), or Anti Raid sees a raid, the server is locked down at once: the channels close and the invites are deleted and paused, like !lockdown. The lockdown ends by itself (after 30 minutes by default), or earlier with !lockdown end or the dashboard. It is off until you turn it on.
An anti-nuke alert that ends with the panic mode line: the server is in lockdown and the invites are paused

In Discord: with panic mode on, the alert says the server is in lockdown.

Trusted admins, owner only and the owner’s DM

  • Trusted admins (!antinuke admins add) are named by the owner: the protections never touch them and they can change the anti-nuke.
  • Owner only (!antinuke settings --owner-only true): only the owner and the trusted admins can change the anti-nuke and press Restore. Other administrators can still read it.
  • DM to the owner: the owner gets a DM when a protection acts, at most once a minute. It is on by default; !antinuke settings --dm-owner false turns it off. The alert card names the account and its ID.
chu tries to change a protection and Petto answers that only the owner and the trusted admins can change it

In Discord: with owner only on, an administrator who is not trusted is refused.

A DM from Petto: a protection acted in Petto Land, with the same text as the alert

In Discord: the DM the owner gets when a protection acts.

Log and restore

Every time a protection acts it saves an event with what it can put back, and the alert has a Restore button. Restoring (button, dashboard log or !antinuke restore) can:
  • rebuild deleted channels and roles with their settings (not their messages)
  • lift mass bans, or ban again after mass unbans
  • delete the channels and roles that were created in a burst
  • give back the roles taken from the account that was quarantined
The anti-nuke alert with the Restore button, and the private answer listing the channels recreated and the roles given back

In Discord: Restore pressed on the alert: only the person who pressed it sees what was put back.

The server owner, the trusted admins and the administrators can restore (with owner only on, only the owner and the trusted admins). Restoring rebuilds the roles before the channels, and tries again when Discord asks to slow down.
The Log tab with four events: a channel deletion that can be restored, a bot added, an everyone ping and a restored ban

Dashboard → Moderation → Anti-raid & nuke → Log: every event, with Restore where something can still be put back.

Old command

The first version still works: !automod antinuke <enabled> [threshold] [window_seconds] is the old single switch.
liam turns the old anti-nuke switch on with 5 actions in 10 seconds

In Discord: the old single switch.

Whitelist

Users, bots and roles exempt from anti-nuke tracking entirely. In the commands above, !antinuke whitelist also takes roles; the old !automod antinuke-whitelist takes accounts.
liam exempts Radio Bot by ID

In Discord: an account exempt from the anti-nuke.

liam takes Radio Bot off the anti-nuke whitelist

In Discord: an account taken off the list.

The whitelist with the Stats Helper bot

In Discord: the exempt accounts.

Add every co-owner and trusted admin bot to the whitelist before turning this on, anti-nuke can’t tell the difference between a compromised account and a busy admin doing legitimate cleanup.