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

# Antinuke

> Protect your server from destructive actions with raze's real-time antinuke system.

# Antinuke

> Protect your server from destructive actions with raze's real-time antinuke system.

## What is antinuke?

The antinuke system monitors your server's audit log in real time. When an unwhitelisted member performs destructive actions beyond your configured threshold, raze automatically punishes them instantly.

<Warning>
  You must run `;antinuke setup` before enabling any antinuke modules.
</Warning>

## Initial setup

```bash theme={null} theme={null}
;antinuke setup
```

Run this once before using any other antinuke commands.

## Enable / disable

<CodeGroup>
  ```bash Enable theme={null} theme={null}
  ;antinuke enable
  ```

  ```bash Disable theme={null} theme={null}
  ;antinuke disable
  ```
</CodeGroup>

## View configuration

```bash theme={null} theme={null}
;antinuke config
```

## Global settings

### Punishment

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;antinuke punishment (ban|kick|softban|strip)
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke punishment ban
  ```
</CodeGroup>

| Type      | Action                                     |
| --------- | ------------------------------------------ |
| `ban`     | Permanently bans the actor                 |
| `kick`    | Removes the actor from the server          |
| `softban` | Bans then immediately unbans               |
| `strip`   | Removes all dangerous roles from the actor |

### Duration window

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;antinuke duration (minutes)
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke duration 5
  ```
</CodeGroup>

The time window in which actions are counted toward the threshold. Defaults to `5` minutes.

### Log channel

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;antinuke logchannel (#channel)
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke logchannel #antinuke-logs
  ```
</CodeGroup>

## Antinuke modules

Each module monitors a specific action type. Click a module to see its commands.

<AccordionGroup>
  <Accordion title="ban — Prevents members from being mass-banned">
    Triggers when a member bans others beyond the threshold within the duration window.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke ban enable
      ;antinuke ban disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke ban threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke ban punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="kick — Prevents members from being mass-kicked">
    Triggers when a member kicks others beyond the threshold within the duration window.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke kick enable
      ;antinuke kick disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke kick threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke kick punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="botadd — Prevents unauthorised bots from being added">
    Triggers when a member adds a bot that is not whitelisted.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke botadd enable
      ;antinuke botadd disable
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke botadd punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="rolecreate — Prevents roles from being mass-created">
    Triggers when a member creates roles beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke rolecreate enable
      ;antinuke rolecreate disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke rolecreate threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke rolecreate punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="roledelete — Prevents roles from being mass-deleted">
    Triggers when a member deletes roles beyond the threshold. Also triggers if a locked role is deleted.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke roledelete enable
      ;antinuke roledelete disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke roledelete threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke roledelete punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="editrole — Prevents dangerous permissions from being added to roles">
    Triggers when a member adds dangerous permissions to a role, or edits a locked role.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke editrole enable
      ;antinuke editrole disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke editrole threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke editrole punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="giverole — Prevents dangerous roles from being mass-assigned">
    Triggers when a member assigns roles with dangerous permissions beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke giverole enable
      ;antinuke giverole disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke giverole threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke giverole punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="channelcreate — Prevents channels from being mass-created">
    Triggers when a member creates channels beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke channelcreate enable
      ;antinuke channelcreate disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke channelcreate threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke channelcreate punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="channeldelete — Prevents channels from being mass-deleted">
    Triggers when a member deletes channels beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke channeldelete enable
      ;antinuke channeldelete disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke channeldelete threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke channeldelete punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="webhook — Prevents webhooks from being mass-created">
    Triggers when a member creates webhooks beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke webhook enable
      ;antinuke webhook disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke webhook threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke webhook punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="emoji — Prevents emojis from being mass-created, deleted, or updated">
    Triggers when a member creates, deletes, or updates emojis beyond the shared threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke emoji enable
      ;antinuke emoji disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke emoji threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke emoji punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="mute — Prevents members from being mass-timed out">
    Triggers when a member times out others beyond the threshold.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke mute enable
      ;antinuke mute disable
      ```

      ```bash Threshold theme={null} theme={null}
      ;antinuke mute threshold (number)
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke mute punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="vanity — Prevents the server vanity URL from being changed">
    Triggers when a member changes the server's vanity URL.

    <CodeGroup>
      ```bash Enable / Disable theme={null} theme={null}
      ;antinuke vanity enable
      ;antinuke vanity disable
      ```

      ```bash Punishment theme={null} theme={null}
      ;antinuke vanity punishment (ban|kick|softban|strip)
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Whitelist

The whitelist has two levels: **global** and **per-module**.

* A **globally whitelisted** user or role bypasses every antinuke module entirely.
* A **per-module whitelisted** user or role only bypasses the specific modules you list — all other modules still apply.

<Warning>
  Only whitelist users and roles you absolutely trust. A globally whitelisted member can perform any destructive action without being punished.
</Warning>

### Global whitelist

<CodeGroup>
  ```bash Add theme={null} theme={null}
  ;antinuke whitelist add (@user|@role)
  ```

  ```bash Remove theme={null} theme={null}
  ;antinuke unwhitelist (@user|@role)
  ```
</CodeGroup>

### Per-module whitelist

Whitelist a user or role for one or more specific modules. Pass the module names after the target — the same names used in `;antinuke <module> enable`.

<CodeGroup>
  ```bash Add theme={null} theme={null}
  ;antinuke whitelist add (@user|@role) (module) [module ...]
  ```

  ```bash Example — user allowed to ban and kick only theme={null} theme={null}
  ;antinuke whitelist add @wanderer ban kick
  ```

  ```bash Example — role allowed to manage channels theme={null} theme={null}
  ;antinuke whitelist add @Moderator channelcreate channeldelete
  ```

  ```bash Remove specific modules theme={null} theme={null}
  ;antinuke unwhitelist (@user|@role) (module) [module ...]
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke unwhitelist @wanderer ban
  ```
</CodeGroup>

**Valid module names:** `ban`, `botadd`, `channelcreate`, `channeldelete`, `editrole`, `emoji_add`, `emoji_remove`, `emoji_update`, `giverole`, `kick`, `mute`, `rolecreate`, `roledelete`, `vanity`, `webhook`

### View whitelist

```bash theme={null} theme={null}
;antinuke whitelist list
```

Shows all entries. Global entries are labelled **global**; per-module entries show each module they cover.

## Admins

Antinuke admins can manage antinuke settings and bypass antinuke checks.

<CodeGroup>
  ```bash Add theme={null} theme={null}
  ;antinuke admin add (@user)
  ```

  ```bash Remove theme={null} theme={null}
  ;antinuke admin remove (@user)
  ```

  ```bash List theme={null} theme={null}
  ;antinuke admin list
  ```
</CodeGroup>

## Staff roles

Members with a configured staff role bypass antinuke punishment.

<CodeGroup>
  ```bash Add theme={null} theme={null}
  ;antinuke staff add (@role)
  ```

  ```bash Remove theme={null} theme={null}
  ;antinuke staff remove (@role)
  ```

  ```bash List theme={null} theme={null}
  ;antinuke staff list
  ```
</CodeGroup>

## Role locks

Prevent a role from being deleted or having dangerous permissions added.

<CodeGroup>
  ```bash Add theme={null} theme={null}
  ;antinuke rolelock add (@role)
  ```

  ```bash Remove theme={null} theme={null}
  ;antinuke rolelock remove (@role)
  ```

  ```bash List theme={null} theme={null}
  ;antinuke rolelock list
  ```
</CodeGroup>

## Restore a punished member

Clears the punishment flag and restores the member's roles if the punishment was `strip`.

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;antinuke restore (@user)
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke restore @wanderer
  ```
</CodeGroup>

## Set antinuke owner

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;antinuke owner (@user)
  ```

  ```bash Example theme={null} theme={null}
  ;antinuke owner @wanderer
  ```
</CodeGroup>
