> For the complete documentation index, see [llms.txt](https://docs.securitybot.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.securitybot.gg/protection/anti-nuke.md). Agents can also search and read this documentation through its [MCP server](https://docs.securitybot.gg/~gitbook/mcp).

# Anti-Nuke

Stop mass bans, kicks, deletions and risky permission changes.

Anti-Nuke watches what staff and bots do. When someone goes over a limit, or does something risky, Security Bot punishes them.

<figure><img src="https://3518259152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQwAXme9ouKllbB2Vwt%2Fuploads%2Fgit-blob-25148d62a16c50685cadd63ef32ffe510c0c82de%2Fanti-nuke.png?alt=media" alt="Anti-Nuke page with limits and punishments"><figcaption></figcaption></figure>

## How it works

* **Limits** count each member's actions over 10 minutes. Going over the limit triggers the punishment.
* **Instant actions** punish on the first try, like adding a bot or giving out admin permissions.
* **Punishments** are **Kick**, **Ban** or **Clear roles**.

{% hint style="info" %}
Never punished: the server owner, members whose highest role is above Security Bot's, and [whitelisted](https://docs.securitybot.gg/access/whitelists.md) users and roles.
{% endhint %}

## Set it up

{% tabs %}
{% tab title="Dashboard" %}

1. Open your server on [securitybot.gg](https://securitybot.gg) and go to **Anti-Nuke**.
2. Turn each trigger on or off.
3. Set **Limit per 10 minutes** and **Punishment**.
4. Click **Save changes**.
   {% endtab %}

{% tab title="Commands" %}

| Command                                 | Example                                                       |
| --------------------------------------- | ------------------------------------------------------------- |
| `/setlimit action limit`                | `/setlimit action:Banning Members limit:3`                    |
| `/setpunishment action punishment_type` | `/setpunishment action:Deleting Channels punishment_type:Ban` |
| `/enable action`                        | `/enable action:Adding Bots`                                  |
| `/disable action`                       | `/disable action:Creating Roles`                              |
| `/settings category:Anti Nuke`          | Shows the current setup                                       |
| {% endtab %}                            |                                                               |
| {% endtabs %}                           |                                                               |

## Triggers

### Limits

| Trigger             | Counts                                                    | Plan    |
| ------------------- | --------------------------------------------------------- | ------- |
| Anti Ban            | Bans                                                      | Free    |
| Anti Kick           | Kicks                                                     | Free    |
| Anti Channel Create | New channels                                              | Free    |
| Anti Channel Delete | Deleted channels                                          | Free    |
| Anti Role Create    | New roles                                                 | Free    |
| Anti Role Delete    | Deleted roles                                             | Free    |
| Anti Mention Spam   | `@everyone` and `@here` pings. Administrators are exempt. | Premium |

### Instant actions

| Trigger                     | What happens                                                                                        | Plan    |
| --------------------------- | --------------------------------------------------------------------------------------------------- | ------- |
| Anti Bot Add                | Kicks the new bot and punishes whoever added it                                                     | Free    |
| Anti Prune                  | Punishes whoever runs a member prune                                                                | Free    |
| Anti Admin Role Assign      | Takes back a role with [dangerous permissions](#dangerous-permissions) and punishes whoever gave it | Free    |
| Anti Role Permission Change | Removes dangerous permissions added to a role and punishes whoever added them                       | Free    |
| Anti Webhook Create         | Deletes the new webhook and punishes whoever made it                                                | Premium |
| Anti Vanity Change          | Punishes whoever changes the vanity URL                                                             | Premium |
| Anti Server Icon Change     | Punishes whoever changes the icon                                                                   | Premium |
| Anti Server Rename          | Punishes whoever renames the server                                                                 | Premium |
| Anti Channel Rename         | Punishes whoever renames a channel                                                                  | Premium |
| Anti Role Rename            | Punishes whoever renames a role                                                                     | Premium |
| Anti Emoji Rename           | Punishes whoever renames an emoji                                                                   | Premium |
| Anti Emoji Delete           | Punishes whoever deletes an emoji                                                                   | Premium |
| Anti Invite Delete          | Punishes whoever deletes an invite                                                                  | Premium |

Renames, icon, vanity, emoji and invite changes are not undone. To bring deleted items back, use [Recovery](https://docs.securitybot.gg/settings/recovery.md).

### Message filter

| Filter           | What happens                                                                  | Plan |
| ---------------- | ----------------------------------------------------------------------------- | ---- |
| Anti Invite Link | Deletes Discord invite links. Nobody is punished. Skips whitelisted channels. | Free |

## Dangerous permissions

These permissions trigger **Anti Admin Role Assign** and **Anti Role Permission Change**:

Administrator, Manage Server, Manage Roles, Manage Channels, Manage Webhooks, Ban Members, Kick Members, Manage Messages, Manage Threads, Manage Nicknames.

## Tips

* Start low. A limit of 2 or 3 bans per 10 minutes suits most servers.
* Whitelist a busy mod role instead of raising a limit for everyone.
* Use **Ban** for deletions and **Clear roles** when you want to review first.
* Pair Anti-Nuke with [Beast Mode](https://docs.securitybot.gg/protection/beast-mode.md) to catch attacks spread across accounts.
