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

# AntiNuke

> Comprehensive protection against server nuking and malicious actions.

# AntiNuke

AntiNuke protects your server from mass destruction, malicious admin actions, and unauthorized changes. It covers roles, channels, webhooks, bans, kicks, integrations, vanity URL, emojis, stickers, and more.

## Features

* **Bot Add Protection**: Prevents unauthorized bots from joining.
* **Role/Channel Protection**: Stops mass role/channel creation, deletion, and updates.
* **Webhook Protection**: Cleans up and prevents unauthorized webhooks.
* **Guild Protection**: Protects server settings, vanity URL, icon, and banner.
* **Kick/Ban/Prune Protection**: Detects and stops mass kicks, bans, and member pruning.
* **Emoji/Sticker Protection**: Prevents mass emoji/sticker changes.
* **Integration Protection**: Monitors and blocks suspicious integration changes.
* **Rate Limiting**: Configurable thresholds for each action.
* **Automatic Recovery**: Restores deleted roles/channels, permissions, and webhooks.
* **Trust & Whitelist System**: Allow trusted users to bypass protection.
* **Detailed Logging**: Tracks all actions and punishments.

## Requirements

* Bot must have permissions: Administrator, Ban Members, Kick Members, Manage Roles, Manage Channels, View Audit Logs, Send Messages, Embed Links.

## Setup

### Enable AntiNuke

```bash theme={null}
,antinuke toggle on
```

### Disable AntiNuke

```bash theme={null}
,antinuke toggle off
```

### Enable/Disable Individual Modules

```bash theme={null}
,antinuke [module] [on/off] [--threshold N] [--do punishment]
```

**Example:**

```bash theme={null}
,antinuke botadd on --threshold 5 --do ban
,antinuke role off
```

#### Available Modules

* `bot_add` — Bot join protection
* `role_update` — Role update protection
* `role_create` — Role creation protection
* `channel_update` — Channel update protection
* `channel_create` — Channel creation protection
* `guild_update` — Server settings/vanity protection
* `kick` — Mass kick protection
* `ban` — Mass ban protection
* `member_prune` — Member prune protection
* `webhooks` — Webhook protection
* `emoji_update` — Emoji update protection
* `emoji_create` — Emoji creation protection
* `sticker_update` — Sticker update protection
* `sticker_create` — Sticker creation protection
* `integration` — Integration protection

### Set Thresholds

Set how many actions trigger punishment:

```bash theme={null}
,antinuke threshold [module] [number]
```

Example:

```bash theme={null}
,antinuke threshold bot_add 3
```

### Set Punishment

Choose what happens when a user triggers AntiNuke:

```bash theme={null}
,antinuke punishment [ban/kick/strip]
```

### Trust & Whitelist

* **Trust (Admin):**
  * Allow a user to manage AntiNuke settings:
    ```bash theme={null}
    ,antinuke trust @user
    ,antinuke trust remove @user
    ,antinuke trusted
    ```
* **Whitelist:**
  * Allow a user to bypass all AntiNuke checks:
    ```bash theme={null}
    ,antinuke whitelist @user
    ,antinuke whitelist remove @user
    ,antinuke whitelisted
    ```

### View & List Settings

* View all settings:
  ```bash theme={null}
  ,antinuke settings
  ```
* List all modules and whitelisted users:
  ```bash theme={null}
  ,antinuke list
  ```

### Recovery & Cleanup

* **Automatic Recovery:**
  * Deleted roles/channels/webhooks are restored automatically.
* **Manual Cleanup:**
  * Remove invalid whitelist/admin entries:
    ```bash theme={null}
    ,antinuke cleanup
    ```

### All-in-One Toggle

Enable or disable all modules at once:

```bash theme={null}
,antinuke all on
,antinuke all off
```

### Module Reference

* `,antinuke modules` — List all available modules

## Example Usage

```bash theme={null}
,antinuke toggle on
,antinuke botadd on --threshold 2 --do ban
,antinuke role_update on --threshold 3 --do kick
,antinuke punishment strip
,antinuke trust @AdminUser
,antinuke whitelist @TrustedUser
,antinuke settings
```

## Best Practices

* Always set up trusted users and whitelist your staff to avoid false positives.
* Regularly review your settings with `,antinuke settings`.
* Use thresholds that match your server's activity.
* Test the system in a safe environment before going live.

<Warning>
  Improper configuration may result in staff or bots being punished. Always whitelist and trust your staff and bots.
</Warning>

<Note>
  For raid protection, see the [AntiRaid](/antiraid) documentation.
</Note>
