Anti-nuke ☢️
Automatic protection against a compromised or malicious admin tearing your server apart.
What it protects you from
A "nuke" is when someone with staff permissions — a hacked moderator account, a rogue bot, or a person you trusted too much — starts mass-banning members, deleting channels, or wiping roles. It happens fast: a script can destroy months of work in under a minute, usually while you're asleep.
Anti-nuke watches for that pattern. When one person performs too many destructive actions in too short a time, BMO steps in automatically — it can alert you, kick or ban the offender, or strip their roles so they lose their permissions instantly. You don't have to be online for any of it.
Anti-nuke is off by default. Turn it on once your server has real staff — it's the single best insurance policy a growing server can have.How detection works
Every time a watched event happens, BMO checks the server's audit log to find out who actually did it, then counts that action against them. Two settings control when it reacts:
- Cooldown window — how far back BMO looks, in seconds. Default: 15 seconds (allowed range 3–300).
- Overload threshold — how many watched actions by the same person inside that window trip the alarm. Default: 5 events (allowed range 2–30).
So with the defaults: five destructive actions by one person within 15 seconds triggers anti-nuke. A moderator deleting one channel or banning one troll never comes close — but a mass-ban script does instantly. After it fires, the same person won't be actioned again until a full cooldown window has passed, so you get one clear response instead of a pile of duplicates.
Detection relies on the audit log, so BMO needs the View Audit Log permission. Without it, anti-nuke can't tell who did what and won't trigger at all. Run/antinuke status — it lists any permissions the bot is missing.
What counts as a watched event
These are the events anti-nuke tracks, each verified against the audit log:
| Category | Events counted |
|---|---|
| Members | Bans, unbans, kicks, role changes on a member, nickname changes |
| Channels | Channel created, deleted, or edited |
| Roles | Role created, deleted, or edited |
| Webhooks | Webhook created, deleted, or edited |
| Emojis & stickers | Emoji or sticker created, deleted, or renamed |
| Server | Vanity invite URL changed |
One extra safeguard runs on every role edit, independent of the counters: if a role suddenly gains a dangerous permission — Administrator, Manage Server, Manage Roles, Manage Channels, Kick Members, Ban Members, Manage Webhooks, Manage Emojis & Stickers, or Mention Everyone — BMO posts a "Dangerous Role Permissions Added" alert to your log channel so you can review it, even if no threshold was crossed.
Turning it on
Dashboard (recommended): open your server on the dashboard and go to the Anti-nuke page (under the Safety group). Flip Enabled on and hit save — the defaults are sensible out of the box.
Command: /antinuke enable toggles it; /antinuke status
shows the full current setup, including any missing bot permissions.
The four response actions
When the threshold is crossed, BMO performs whichever action you've picked. Whatever you choose, an alert is always posted to your log channel with who triggered it, which event tipped it over, the event count, and whether the action succeeded.
| Action | What happens | Needs |
|---|---|---|
notify (default) |
Posts the alert and does nothing else. Good while you're tuning settings. | — |
kick |
Kicks the offender from the server. They can rejoin if they have an invite. | Kick Members |
ban |
Bans the offender — this works even if they've already left the server. | Ban Members |
strip |
Removes the offender's roles, which takes away their permissions while keeping them in the server so you can question them. | Manage Roles |
What strip does, exactly: BMO removes every role it can from the person — all their roles except @everyone, roles managed by integrations (bot roles, booster roles), and any role positioned at or above BMO's own role. It's not limited to "dangerous" roles: the offender is left with effectively no permissions, but they stay in the server and their case stays visible.
Role order matters. BMO can only kick, ban, or strip someone whose top role is below BMO's role. Keep BMO's role near the top of your role list (Server Settings → Roles) or it will detect a nuke but be unable to stop the attacker — the alert will say exactly why the action failed.Who is never punished
Anti-nuke skips counting actions from people it should obviously trust:
- The server owner — always exempt.
- BMO itself — its own cleanup actions never count.
- Bots — if Ignore bots is on (it is by default). Turn it off if you want other bots watched too, but then whitelist the bots you trust, or your music bot's channel edits could trip the alarm.
- Whitelisted users — people you add explicitly.
- Whitelisted roles — anyone holding a role you've whitelisted.
Manage whitelists on the dashboard's Anti-nuke page (user IDs as a simple list, roles with a
role picker), or by command: /antinuke wladd @user, /antinuke wlremove @user,
and /antinuke wllist to review it.
/antinuke commands manage the user whitelist. And remember: a whitelisted account that
gets hacked is invisible to anti-nuke, so keep the list as short as you can.
DM notice
Optionally, BMO can send the offender a direct message when anti-nuke acts on them, telling them
which server triggered it, what action was taken, and why (e.g. "5 actions in 15s"). It's off by
default; bots are never DMed. Turn it on with DM offending user on the dashboard
or /antinuke dm.
Where alerts go
Anti-nuke posts its alerts to the first channel it finds in this order:
- The anti-nuke log channel, if you've set one (dashboard field or
/antinuke logchannel #channel). - Otherwise, your server's audit log channel.
- Otherwise, your server's general log channel.
Running /antinuke logchannel with no channel clears the override so BMO goes back
to the fallback order.
The dashboard page
Everything above lives on one form: dashboard → your server → Anti-nuke (Safety group). The fields are:
- Enabled — the master switch.
- Cooldown window (seconds) — 3 to 300.
- Events to trigger — 2 to 30.
- Action — Notify, Kick, Ban, or Strip.
- Ignore bots — skip counting other bots' actions.
- DM offending user — send the notice described above.
- Log channel — channel picker; leave empty to use the fallback order.
- Whitelist user IDs — paste IDs separated by commas or new lines.
- Whitelist roles — pick trusted roles.
Command reference
All /antinuke commands require the Administrator permission and
only work inside a server.
| Command | What it does |
|---|---|
/antinuke | Shows the status embed (same as status). |
/antinuke status | Current settings, whitelist counts, and any missing bot permissions. |
/antinuke enable [true/false] | Turn protection on or off; omit the value to toggle. |
/antinuke cooldown <seconds> | Set the detection window (3–300 seconds). |
/antinuke overload <count> | Set how many events trip the alarm (2–30). |
/antinuke action <notify|kick|ban|strip> | Choose the response action. |
/antinuke logchannel [#channel] | Set the alert channel; omit the channel to clear the override. |
/antinuke ignorebots [true/false] | Toggle whether other bots' actions are counted. |
/antinuke dm [true/false] | Toggle the DM notice to the offender. |
/antinuke wladd @user | Add a user to the whitelist. |
/antinuke wlremove @user | Remove a user from the whitelist. |
/antinuke wllist | List whitelisted users. |
Recommended starter settings
A safe way to roll it out: enable anti-nuke with the defaults (15-second window, 5 events) and leave the action onnotify for a week. Watch the log
channel — if normal staff work never shows up there, switch the action to ban (stops
an attacker for good, even if they leave) or strip (defuses them but keeps them around
to talk to). Whitelist your co-owner, leave Ignore bots on, and make sure BMO's role sits
above your staff roles.
Good to know
- Anti-nuke reacts to the pace of actions, not their content — a slow, careful attacker spacing actions out beyond your window won't trip it. Shorter windows with lower thresholds catch more, at a higher risk of flagging a busy admin doing a big cleanup.
- Doing a legitimate mass cleanup (deleting many channels or roles at once)? Temporarily whitelist yourself, or turn anti-nuke off and back on afterwards.
- Anti-nuke limits damage — it can't undo bans or restore deleted channels. Pair it with Member guard for protection at the door and jail for day-to-day moderation.