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

# Anti-nuke

> Stop rogue moderators, hacked accounts and bad bots before they wreck your server.

Newt counts what each person does: bans, kicks, timeouts, deletes. When someone goes over a limit, Newt stops them before the next one lands. It's on from the start for moderation done through Newt.

## <Icon icon="flag-checkered" size={24} /> Set it up

<Steps>
  <Step title="Give your mods their roles on the Moderation tab">
    Moderators need no Discord permissions. They act through Newt, so Newt sees every ban. [How](/moderation/moderation#give-your-mods-access)
  </Step>

  <Step title="Move Newt's role to the top">
    Newt can't stop anyone whose highest role sits above its own.
  </Step>

  <Step title="Pick a level">
    On the dashboard's **Anti-nuke** tab, choose **Relaxed**, **Balanced** or **Strict**, or change any number to make your own.
  </Step>

  <Step title="Watch Discord itself">
    Optional. Tick **Also count what people do in Discord** to catch hacked admins and bad bots that never use Newt. Trust your ticket bot first.
  </Step>
</Steps>

<Warning>
  Newt's role must be the highest role in your server. Drag it to the top in **Server Settings → Roles**. The **Health check** on the Anti-nuke tab names any role above it.
</Warning>

## <Icon icon="gauge-high" size={24} /> The limits

Each cell is a minute / an hour. Going over either one stops them. **Balanced** is the default.

| Action | Relaxed | Balanced | Strict | Counted |
| - | - | - | - | - |
| Bans | 5 / 25 | 3 / 12 | 2 / 6 | Newt and Discord |
| Kicks | 5 / 25 | 3 / 12 | 2 / 6 | Newt and Discord |
| Timeouts | 10 / 50 | 5 / 25 | 3 / 12 | Newt and Discord |
| Restrictions | 5 / 20 | 3 / 10 | 2 / 5 | Newt only |
| Purges | 8 / 40 | 4 / 20 | 2 / 10 | Newt and Discord |
| Channels deleted | 4 / 12 | 2 / 6 | 1 / 3 | Discord only |
| Channels made | 8 / 30 | 5 / 15 | 3 / 8 | Discord only |
| Roles deleted | 4 / 12 | 2 / 6 | 1 / 3 | Discord only |
| Roles made | 8 / 30 | 5 / 15 | 3 / 8 | Discord only |
| Webhooks made | 4 / 12 | 2 / 6 | 1 / 3 | Discord only |
| Emojis and stickers deleted | 6 / 20 | 3 / 10 | 2 / 5 | Discord only |

**Discord only** rows count when you turn on watching Discord itself. Your own numbers can be 1 to 50 a minute and 1 to 500 an hour.

## <Icon icon="hand" size={24} /> When someone goes over

Through Newt, the action that would go over never happens. Then:

1. Their moderation through Newt is **paused** until you let them back.
2. The punishment. **Stop them** (the default) takes away their roles with dangerous permissions and leaves the rest. **Restrict**, **Kick** or **Ban** go further. A bot is kicked, or banned.
3. **Undo** (on by default) puts back what they did in the last hour: unbans, lifted timeouts and restrictions, deleted channels, roles and webhooks they made, and rebuilt channels and roles they deleted.
4. **Lock the whole server down** (off by default) runs `/lock server`.
5. An alert goes to your mod log channel, or another you pick, and to your DMs. It can ping roles.

## <Icon icon="bolt" size={24} /> Stopped at once

While watching Discord itself, these stop someone the first time. Each change is put back, and each check can be switched off.

* Giving anyone a dangerous permission: **Administrator**, **Manage Server**, **Manage Roles**, **Manage Channels**, **Manage Webhooks**, **Manage Messages**, **Ban**, **Kick** or **Timeout Members**.
* Changing the vanity link.
* Pruning members.

## <Icon icon="crown" size={24} /> Trusted admins

People and bots the anti-nuke never counts. They can also change who moderates and the anti-nuke on the dashboard. Only the server owner picks them, on the **Anti-nuke** tab or with `/antinuke trust`. Up to 25.

## <Icon icon="terminal" size={24} /> Commands

<CodeGroup>
  ```plaintext Syntax theme={null}
  /antinuke resume <member>
  ```

  ```plaintext Example theme={null}
  /antinuke resume member:@Alex
  ```
</CodeGroup>

Lets a stopped moderator moderate again. Roles that were taken aren't given back.

<AccordionGroup>
  <Accordion title="See what it watches" icon="eye">
    The settings, a health check, the trusted admins and who is stopped.

    ```plaintext theme={null}
    /antinuke status
    ```
  </Accordion>

  <Accordion title="Trust someone" icon="user-shield">
    Owner only.

    ```plaintext theme={null}
    /antinuke trust <user>
    /antinuke untrust <user>
    ```
  </Accordion>
</AccordionGroup>

## <Icon icon="circle-info" size={24} /> Good to know

* Acting on someone who joined in the last day doesn't count. That's raid cleanup, not a nuke.
* The server owner and Newt are never counted.
* A stopped moderator can't use any moderation command, even with Administrator.
* While watching Discord itself, anything more they do in the 10 minutes after they're stopped is quietly undone too.
* Counts last an hour and are never saved.
* Only the owner and trusted admins can change these settings, so a rogue admin can't switch it off first.

**Permission:** The server owner and trusted admins. `/antinuke trust` and `/antinuke untrust` are the owner's alone.
