> ## Documentation Index
> Fetch the complete documentation index at: https://docs.confine.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. Confine's antinuke system 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 a moderator can take within a short window. Cross that limit, and confine automatically punishes them and pings the server owner.

***

## Setting it up

<Tip>
  Discord's mass ban tool can wipe out **100+ members** in seconds. Pair antinuke with [fake permissions](/security/fake-permissions) so moderators can't touch it.
</Tip>

### Giving others access to configure the antinuke

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

<CodeGroup>
  ```javascript Syntax theme={null}
  ,antinuke admin (user)
  ```

  ```javascript Example theme={null}
  ,antinuke admin @financely
  ```
</CodeGroup>

<Warning>
  Anyone granted this can rewrite your entire antinuke setup — only give this to people you fully trust. You can run this command again to **remove** them from antinuke administrator.
</Warning>

### Whitelisting trusted users

Need someone to bypass antinuke entirely (like a co-owner or bot)? Whitelist them:

<Warning>
  Whitelisted users skip antinuke checks completely — they won't be punished no matter what they do.
</Warning>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,antinuke whitelist (user)
  ```

  ```javascript Example theme={null}
  ,antinuke whitelist @financely
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/images/Screenshot-2026-08-01-165633.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=9442a37a9fe008f993beff3651526536" alt="Screenshot 2026 08 01 165633" width="567" height="309" data-path="images/Screenshot-2026-08-01-165633.png" />
</Frame>

***

## Turning on protection modules

### Flags you can tune

<AccordionGroup>
  <Accordion title="Threshold">
    How many actions can happen before confine steps in.

    <Info>
      Keeping this between `1` and `6` is usually the safest range.
    </Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      $threshold (number)
      ```

      ```javascript Example theme={null}
      $threshold 3
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Punishment">
    What happens to the moderator once they cross the threshold.

    <CodeGroup>
      ```javascript Syntax theme={null}
      $punishment (punishment)
      ```

      ```javascript Example theme={null}
      $punishment ban
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Command tracking">
    Decide if confine's own moderation commands (like `,ban`) should also count toward the threshold.

    <CodeGroup>
      ```javascript Syntax theme={null}
      $command (on or off)
      ```

      ```javascript Example theme={null}
      $command on
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

### Protection modules

<AccordionGroup>
  <Accordion title="Mass bans">
    Catch and stop a moderator from banning large numbers of members in a short burst.

    <Info>
      Turning on `$command on` is recommended so this also tracks confine's own ban command.
    </Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke ban (on or off) $threshold (number) $punishment (punishment) $command (on | off)]
      ```

      ```javascript Example theme={null}
      ,antinuke ban on $threshold 3 $punishment ban $command on
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Mass kicks">
    Catch and stop a moderator from kicking a large batch of members quickly.

    <Info>
      Turning on `$command on` is recommended so this also tracks confine's own kick command.
    </Info>

    <CodeGroup>
      ```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
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Channel spam">
    Prevent mass creation or deletion of channels in a short window.

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke channel (on or off) $threshold (number) $punishment (punishment)
      ```

      ```javascript Example theme={null}
      ,antinuke channel on $threshold 3 $punishment ban
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Role creation and deletion">
    Stop a wave of role creations and deletions from wiping out your server's role structure.

    <Info>
      Turning on `$command on` is recommended for full coverage.
    </Info>

    <CodeGroup>
      ```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
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Webhook creation">
    Block a flood of new webhooks from being set up, often used to spam ping or exploit channels.

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke webhook (on or off) $threshold (number) $punishment (punishment)
      ```

      ```javascript Example theme={null}
      ,antinuke webhook on $threshold 3 $punishment ban
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Emoji deletion">
    Block a flood of new emojis from being deleted.

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke emoji (on or off) $threshold (number) $punishment (punishment)
      ```

      ```javascript Example theme={null}
      ,antinuke emoji on $threshold 3 $punishment ban
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Sticker deletion">
    Block a flood of new sticker from being deleted.

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke sticker (on or off) $threshold (number) $punishment (punishment)
      ```

      ```javascript Example theme={null}
      ,antinuke sticker on $threshold 3 $punishment ban
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Mass bot additions">
    Block large waves of bots from being added to your server at once.

    <Info>
      To let a specific bot in, allow it first with `antinuke allow (bot id)`.
    </Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke bot (on or off)
      ```

      ```javascript Example theme={null}
      ,antinuke bot on
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Vanity URL changes">
    Stop members from swapping out your server's vanity invite.

    <Warning>
      Discord removed the **ability** for bots to **change vanities** therefore, confine cannot set the **vanity** back. However, I can **punish** the user.
    </Warning>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke vanity (on or off) $punishment (punishment)
      ```

      ```javascript Example theme={null}
      ,antinuke vanity on $punishment ban
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<Info>
  To disable an antinuke module, run the same command you used to enable a module, just switch it to `off`.
</Info>

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/images/Screenshot-2026-08-01-170447.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=81986bb9e32b325197dd8a1244c0bc2e" alt="Screenshot 2026 08 01 170447" width="566" height="174" data-path="images/Screenshot-2026-08-01-170447.png" />
</Frame>

## Checking your configuration

Use `,antinuke config` to see your current antinuke configuration at a glance.

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/antinuke_config.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=34fd9e7da8956fff213d904f484e46dd" alt="Antinuke Config" width="515" height="364" data-path="antinuke_config.png" />
</Frame>

### Viewing all antinuke whitelisted users

Run `,antinuke whitelisted` to view all whitelisted users.

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/images/Screenshot-2026-08-01-160932.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=1292fa624c9a174380e1b5becced2696" alt="Screenshot 2026 08 01 160932" width="346" height="231" data-path="images/Screenshot-2026-08-01-160932.png" />
</Frame>

### Viewing module punishments and thresholds

Run `,antinuke view` to check the punishment and threshold set for each module.

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/images/Screenshot-2026-08-01-165100.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=98bce8f67b6ba53da6e2c80d50867afa" alt="Screenshot 2026 08 01 165100" width="486" height="357" data-path="images/Screenshot-2026-08-01-165100.png" />
</Frame>

### Viewing who has admin access

Run `,antinuke admins` to see everyone who's allowed to configure antinuke.

<Frame>
  <img src="https://mintcdn.com/confine/oq_2yT7Pga2q0ha8/images/Screenshot-2026-08-01-165250.png?fit=max&auto=format&n=oq_2yT7Pga2q0ha8&q=85&s=105f28b330ee74a079db588e32132923" alt="Screenshot 2026 08 01 165250" width="345" height="223" data-path="images/Screenshot-2026-08-01-165250.png" />
</Frame>
