> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bleed.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Antinuke

> Impose restrictions on moderators to prevent destructive behavior.

## Overview

### Why use an antinuke system?

It's important to have an antinuke system in place to prevent moderators from abusing their permissions. This is a security measure which keeps your server safe from any harmful actions.

### How does the antinuke work?

Antinuke sets a limit on the number of actions a moderator can perform in a certain time frame. If the limit is exceeded, the moderator will be punished and a message will be sent to the owner.

***

## Configuring the antinuke

> [!TIP]
>
> Discord recently implemented a new **mass ban** feature which can quickly ban
> **100+ members**. It's **HIGHLY** recommended to utilize [fake
> permissions](https://docs.bleed.bot/security/fake-permissions.md) to prevent moderators from using this
> feature.

### Configuring modules with the modal

Run `/antinuke config` to open the antinuke configuration modal. The modal shows
which modules are enabled and lets you select a module to configure its
settings. Use the matching commands in [configuring with commands](#configuring-with-commands)
if you prefer to configure the antinuke with commands instead of the modal.

![Antinuke configuration modal with the module selector open](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/config-modal.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=8e188860ff8ad6e8f8fa725ec16c8b10)

The antinuke configuration modal shows enabled modules and lets you select a module to configure.

#### Managing antinuke admins

Initially, only the **server owner** can configure the antinuke. Use
`/antinuke admin add` to allow another user to manage it.

> [!WARNING]
>
> This is a dangerous command and will allow the user to entirely alter the
> antinuke configuration.

```javascript Syntax theme={null}
/antinuke admin add user:<user>
```

```javascript Example theme={null}
/antinuke admin add user:@jonathan
```

![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/admin.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=28670ab1d40f4b95b9b38ee8156bb9a1)

To remove an antinuke admin, use `/antinuke admin remove`.

```javascript Syntax     theme={null}
/antinuke admin remove user:<user>
```

```javascript Example theme={null}
/antinuke admin remove user:@j21234
```

#### Exempting users from the antinuke

You can exempt users from the antinuke with the `/antinuke whitelist` command.

> [!WARNING]
>
> This is a dangerous command and will allow the user to bypass the antinuke
> entirely.

```javascript Syntax theme={null}
/antinuke whitelist add user:<user>
/antinuke whitelist remove user:<user>
```

```javascript Example theme={null}
/antinuke whitelist add user:@jonathan
/antinuke whitelist remove user:@j21234
```

![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/whitelist.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=adc7e4045c648cbc3a00644bec55ab18)

### Configuring with commands

#### Watching permission changes

Use these commands to watch permission grants or removals, remove a permission
from the watch list, or view the permissions currently watched. When a watched
permission changes on a role, bleed reverts the change and reports who made it.

```javascript Syntax theme={null}
/antinuke permissions watch direction:<direction> permission:<permission>
/antinuke permissions unwatch direction:<direction> permission:<permission>
/antinuke permissions list
```

```javascript Example theme={null}
/antinuke permissions watch direction:granted permission:manage_roles
/antinuke permissions unwatch direction:removed permission:manage_roles
/antinuke permissions list
```

Use `list` to see which permissions are currently watched. Available permission
values are:

| Permissions |
| - |
| `administrator` |
| `ban_members` |
| `mention_everyone` |
| `kick_members` |
| `moderate_members` |
| `manage_guild` |
| `manage_channels` |
| `manage_roles` |
| `view_audit_log` |
| `manage_webhooks` |
| `manage_expressions` |
| `manage_nicknames` |

#### Configuring modules

Set `setting` to `On` or `Off`. Thresholds define how many actions trigger the
module, and punishment defines what happens when it is triggered. For modules
that support `command_detection`, set it to `True` to include actions performed
with bleed commands.

> [!NOTE]
>
> It's recommended to keep thresholds between `1` and `6`. Available
> punishments are listed in the [punishments](https://docs.bleed.bot/resources/syntax.md#flag-punishments)
> section.

> [accordion] Punishing members for changing the vanity URL
>
> You can prevent members from changing the vanity URL with the following command
>
> > [!WARNING]
> >
> > bleed cannot revert the vanity URL due to Discord limitations.
>
> ```javascript Syntax theme={null}
> /antinuke vanity setting:<On or Off> punishment:<punishment>
> ```
>
> ```javascript Example theme={null}
> /antinuke vanity setting:On punishment:ban
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/vanity.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=b8dd034b9d8432b7376bfb4da99e27c3)

> [accordion] Preventing bots from being added
>
> You can prevent bots from being mass added with the following command
>
> > [!NOTE]
> >
> > Add a bot to the whitelist with `/antinuke whitelist add user:<bot>`.
>
> ```javascript Syntax theme={null}
> /antinuke botadd setting:<On or Off>
> ```
>
> ```javascript Example theme={null}
> /antinuke botadd setting:On
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/botadd.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=ce719dec2c2e10d53cab92dd18fbcad0)

> [accordion] Preventing members from being banned
>
> You can prevent members from being mass banned with the following command
>
> > [!NOTE]
> >
> > Set `command_detection` to `True` to include bans performed with bleed
> > commands.
>
> ```javascript Syntax theme={null}
> /antinuke ban setting:<On or Off> punishment:<punishment> threshold:<number> command_detection:<True or False>
> ```
>
> ```javascript Example theme={null}
> /antinuke ban setting:On punishment:ban threshold:3 command_detection:True
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/ban.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=e33184d195d1dc3928c7d457bed11eb3)

> [accordion] Preventing members from being kicked
>
> You can prevent members from being mass kicked with the following command
>
> > [!NOTE]
> >
> > Set `command_detection` to `True` to include kicks performed with bleed
> > commands.
>
> ```javascript Syntax theme={null}
> /antinuke kick setting:<On or Off> punishment:<punishment> threshold:<number> command_detection:<True or False>
> ```
>
> ```javascript Example theme={null}
> /antinuke kick setting:On punishment:ban threshold:3 command_detection:True
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/kick.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=be3a411394ff7ee291be2ca9068b4c06)

> [accordion] Preventing roles from being deleted
>
> You can prevent roles from being mass deleted with the following command
>
> > [!NOTE]
> >
> > Set `command_detection` to `True` to include role changes performed with
> > bleed commands.
>
> ```javascript Syntax theme={null}
> /antinuke role setting:<On or Off> punishment:<punishment> threshold:<number> command_detection:<True or False>
> ```
>
> ```javascript Example theme={null}
> /antinuke role setting:On punishment:kick threshold:3 command_detection:True
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/role.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=7e5fed0128dcdf26558fcd1662cdbb7e)

> [accordion] Preventing channels from being created or deleted
>
> You can prevent channels from being mass created or deleted with the following command
>
> ```javascript Syntax theme={null}
> /antinuke channel setting:<On or Off> punishment:<punishment> threshold:<number>
> ```
>
> ```javascript Example theme={null}
> /antinuke channel setting:On punishment:ban threshold:3
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/channel.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=e7f96ef268f84a441cd9a780fc4921f0)

> [accordion] Preventing emojis from being deleted
>
> You can prevent emojis from being mass deleted with the following command
>
> ```javascript Syntax theme={null}
> /antinuke emoji setting:<On or Off> punishment:<punishment> threshold:<number>
> ```
>
> ```javascript Example theme={null}
> /antinuke emoji setting:On punishment:ban threshold:3
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/emoji.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=4f71399d0b4bfcd52549654ec1a6ca88)

> [accordion] Preventing webhooks from being created
>
> You can prevent webhooks from being mass created with the following command
>
> ```javascript Syntax theme={null}
> /antinuke webhook setting:<On or Off> punishment:<punishment> threshold:<number>
> ```
>
> ```javascript Example theme={null}
> /antinuke webhook setting:On punishment:ban threshold:3
> ```
>
> ![](https://mintcdn.com/bleed/e31HB3tW_HibSuow/images/security/antinuke/webhook.png?fit=max\&auto=format\&n=e31HB3tW_HibSuow\&q=85\&s=fb1714b1112332ee4c2dd8deb4083829)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.