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

# Antinuke

> Keep your moderators in check and stop destructive actions before they cause damage.

## Overview

Even trusted moderators can go rogue, get compromised, or make mistakes at scale. misery's antinuke watches for sudden bursts of destructive actions and steps in before real damage is done.

### How it works

You set a limit on how many risky actions someone can take within a short window. Cross that limit, and misery punishes them automatically, undoes what it can, and logs it to your antinuke channel.

> [!NOTE]
>
> The window is a rolling **60 seconds** — every new action keeps it open, so slowing down doesn't reset the count.

***

## Setting it up

> [!TIP]
>
> Pair antinuke with [fake permissions](/security/fake-permissions) so your moderators never hold the real permissions that make mass damage possible.

### Giving others access to configure the antinuke

By default, only the **server owner** can touch antinuke settings. To let someone else help manage it, use:

```javascript Syntax theme={null}
,antinuke admin (member)
```

```javascript Example theme={null}
,antinuke admin @financely
```

> [!WARNING]
>
> Anyone granted this can rewrite your entire antinuke setup — only give it to people you fully trust. Run the command again to **remove** them.

### Co-owners

Co-owners get server-owner-level access across misery — antinuke, fake permissions, the bot's profile, and more.

```javascript Syntax theme={null}
,antinuke owner (member)
```

```javascript Example theme={null}
,antinuke owner @financely
```

> [!WARNING]
>
> Server owner only. Running it again revokes co-owner access.

### Whitelisting trusted users

Need someone to bypass antinuke entirely?

```javascript Syntax theme={null}
,antinuke whitelist (member)
```

```javascript Example theme={null}
,antinuke whitelist @financely
```

> [!WARNING]
>
> Whitelisted users skip antinuke checks completely — they won't be punished no matter what they do. Running the command again removes them.

### Choosing where alerts go

```javascript Syntax theme={null}
,antinuke center (channel)
```

```javascript Example theme={null}
,antinuke center #antinuke
```

***

## Turning on protection modules

### Flags you can tune

> **Threshold**
>
> How many actions can happen before misery steps in. Someone is punished on the action that reaches it.
>
> > [!NOTE]
> >
> > Keeping this between `1` and `6` is usually the safest range.
>
> ```javascript Syntax theme={null}
> $threshold (number)
> ```
>
> ```javascript Example theme={null}
> $threshold 3
> ```

> **Punishment**
>
> What happens once someone crosses the threshold: `ban`, `kick`, or `stripstaff`.
>
> `stripstaff` removes their staff roles, fake-permission roles, and every role carrying a dangerous permission — useful when you'd rather investigate than ban.
>
> ```javascript Syntax theme={null}
> $punishment (punishment)
> ```
>
> ```javascript Example theme={null}
> $punishment ban
> ```

> **Command tracking**
>
> Decide whether misery's own moderation commands (like `,ban`) also count toward the threshold.
>
> ```javascript Syntax theme={null}
> $command (on or off)
> ```
>
> ```javascript Example theme={null}
> $command on
> ```

### Protection modules

> **Mass bans**
>
> Stop someone from banning large numbers of members in a short burst.
>
> > [!NOTE]
> >
> > `$command on` is recommended so misery's own `,ban` counts too.
>
> ```javascript Syntax theme={null}
> ,antinuke ban (on or off) $threshold (number) $punishment (punishment) $command (on or off)
> ```
>
> ```javascript Example theme={null}
> ,antinuke ban on $threshold 3 $punishment ban $command on
> ```

> **Mass kicks**
>
> Stop someone from kicking a large batch of members quickly.
>
> ```javascript Syntax theme={null}
> ,antinuke kick (on or off) $threshold (number) $punishment (punishment) $command (on or off)
> ```
>
> ```javascript Example theme={null}
> ,antinuke kick on $threshold 3 $punishment ban $command on
> ```

> **Channel creation and deletion**
>
> Prevent mass creation or deletion of channels.
>
> ```javascript Syntax theme={null}
> ,antinuke channel (on or off) $threshold (number) $punishment (punishment)
> ```
>
> ```javascript Example theme={null}
> ,antinuke channel on $threshold 2 $punishment kick
> ```

> **Role creation and deletion**
>
> Stop a wave of role creations and deletions from wiping out your role structure. `$command on` also counts `,role create`.
>
> ```javascript Syntax theme={null}
> ,antinuke role (on or off) $threshold (number) $punishment (punishment) $command (on or off)
> ```
>
> ```javascript Example theme={null}
> ,antinuke role on $threshold 3 $punishment ban $command on
> ```

> **Webhook creation**
>
> Block a flood of new webhooks, often used to spam pings.
>
> ```javascript Syntax theme={null}
> ,antinuke webhook (on or off) $threshold (number) $punishment (punishment)
> ```
>
> ```javascript Example theme={null}
> ,antinuke webhook on $threshold 2 $punishment ban
> ```

> **Emojis**
>
> Stop mass emoji creation and deletion.
>
> ```javascript Syntax theme={null}
> ,antinuke emoji (on or off) $threshold (number) $punishment (punishment)
> ```
>
> ```javascript Example theme={null}
> ,antinuke emoji on $threshold 2 $punishment kick
> ```

> **Stickers**
>
> Stop mass sticker creation and deletion.
>
> ```javascript Syntax theme={null}
> ,antinuke sticker (on or off) $threshold (number) $punishment (punishment)
> ```
>
> ```javascript Example theme={null}
> ,antinuke sticker on $threshold 2 $punishment kick
> ```

> **Bot additions**
>
> Kick any bot added without approval, and punish whoever added it.
>
> > [!NOTE]
> >
> > To let a specific bot in, allow it first with `,antinuke allow (bot id)`.
>
> ```javascript Syntax theme={null}
> ,antinuke bot (on or off) $punishment (ban or kick)
> ```
>
> ```javascript Example theme={null}
> ,antinuke bot on $punishment ban
> ```

> **Vanity URL changes**
>
> Punish anyone who changes your server's vanity invite.
>
> > [!WARNING]
> >
> > misery can't set a vanity back once it's been changed, so this module only **punishes** the user.
>
> ```javascript Syntax theme={null}
> ,antinuke vanity (on or off) $punishment (ban or kick)
> ```
>
> ```javascript Example theme={null}
> ,antinuke vanity on $punishment kick
> ```

> [!NOTE]
>
> To disable a module, run the same command with `off` — for example `,antinuke ban off`.

***

## Watching dangerous permissions

misery can punish anyone who grants (or removes) a dangerous permission on a role.

```javascript Syntax theme={null}
,antinuke permissions (grant or remove) (permission)
```

```javascript Example theme={null}
,antinuke permissions grant administrator
```

`,antinuke permissions list` shows everything being watched.

## Blacklisted roles

Mark up to **5** roles that only the server owner and co-owners may hand out. Anyone else who gives one — by hand or with `,role` — is banned.

```javascript Syntax theme={null}
,antinuke blacklist add (role)
```

```javascript Example theme={null}
,antinuke blacklist add Administrator
```

| Command | What it does |
| - | - |
| `,antinuke blacklist remove (role)` | Take a role off the blacklist |
| `,antinuke blacklist list` | See every blacklisted role |
| `,antinuke blacklist reset` | Clear the blacklist |

> [!WARNING]
>
> Adding and removing blacklisted roles is **server owner** only.

***

## Checking your configuration

| Command | What it shows |
| - | - |
| `,antinuke configuration` | Your overall setup at a glance |
| `,antinuke view` | The punishment and threshold set for each module |
| `,antinuke whitelisted` | Every whitelisted user |
| `,antinuke admins` | Everyone allowed to configure antinuke |

### Starting over

`,antinuke reset` wipes the whole antinuke configuration. Server owner only.


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