Anti-Nuke

Anti-Nuke protects your server from a compromised admin account or a rogue moderator trying to destroy it.

While Anti-Raid watches members joining the server, Anti-Nuke watches destructive actions performed by people who already have power — bans, kicks, channel deletions and role deletions happening far too fast to be legitimate.


🧨 What Anti-Nuke detects

Anti-Nuke counts destructive admin actions per actor inside a sliding time window:

When a single person crosses the threshold within the window, it is treated as a nuke.

Example: 4 destructive actions by the same user within 15 seconds → nuke detected.

You can tune both the threshold and the window.


🛡️ Response to the rogue actor

When a nuke is detected, YAWBDB acts on the actor:

🧹 Strip roles (default)

Removes all of the actor's roles, instantly neutralizing their permissions while keeping them in the server for review. The safest first line of defence.

👢 Kick

Removes the actor from the server.

🔨 Ban

Bans the actor from the server.

In every case an alert is posted and the action is recorded in the member's moderation history (tagged anti-nuke).


✅ Always exempt

Anti-Nuke never flags:


⚙️ Settings

Option What it does
Action threshold Destructive actions by one actor before it counts as a nuke.
Time window (seconds) Sliding window used to count those actions.
Response strip_roles, kick or ban.
Alert channel Where the detection notification is posted.
Role to ping Optional role mentioned in the alert.
Exempt roles Members with any of these roles are never flagged.

🔑 Permissions

Anti-Nuke requires the bot to have View Audit Log — that is how it identifies who performed each action. Without it, detection cannot work.

Depending on the chosen response it also needs Manage Roles (strip roles), Kick Members, or Ban Members. See Feature permissions.

⚠️ The bot can only act on members below its own highest role. Keep the YAWBDB role near the top so it can neutralize a rogue admin.


💡 Recommended setup

  1. Enable Anti-Nuke and make sure the bot has View Audit Log.
  2. Leave the response on strip_roles to start — it is reversible and non-destructive.
  3. Whitelist your most trusted senior staff roles.
  4. Set an alert channel (and optionally a role to ping) so you hear about incidents immediately.
  5. Move the YAWBDB role high in the list so it outranks the admins it must protect you from.