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

# Antinuke

<Card title="Module: Antinuke" icon="fingerprint" horizontal="True">
  Configure your server's antinuke protections
</Card>

<Tip>To **fully** protect your server, we urge you to read this **whole** page thoroughly</Tip>

## How does it work?

<Tabs />

The antinuke works via threshold. If the perpetrator crosses **x** in a certain time frame, x being the threshold you set, they will be punished. Custom punishments may be set for every trigger, in which you can `ban`, `kick`, `stripstaff` or `jail` the user attemping to harm your server.

## Protection Guides

<Tabs />

<AccordionGroup>
  <Accordion title="Bot join prevention" icon="robot">
    You may prevent **bot joins** inside your server with the following command

    <Warning>To add a bot to the server, the **inviter** and **bot** must be **antinuke whitelisted**</Warning>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke botadd (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke botadd on --do ban
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-botadd.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=1491b487d2d918b1d51545b2ca9af45d" width="380" height="152" data-path="images/antinuke/an-botadd.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass ban prevention" icon="hammer">
    To prevent mass banning, execute the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke ban (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke ban on --do stripstaff --threshold 2 --command on
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-ban.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=91548ef95a2432a4b5c4f8dcc4671f1f" width="404" height="142" data-path="images/antinuke/an-ban.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass kick prevention" icon="door-open">
    To prevent mass member kicking, execute the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke kick (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke kick on --do stripstaff --threshold 2 --command on
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-kick.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=463a9e979aa2cfa1d1de5090c5d4a197" width="412" height="144" data-path="images/antinuke/an-kick.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass role deletion" icon="link">
    You may prevent **mass role deletion** inside your server with the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke roledeletion (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke roledeletion on --do ban --threshold 2
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-rd.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=d78e64e9f5bbab0b9f3fa275935b045a" width="358" height="142" data-path="images/antinuke/an-rd.png" />
    </Frame>
  </Accordion>

  <Accordion title="Dangerous permissions prevention" icon="triangle-exclamation">
    To prevent **dangerous** roles or permissions being given, execute the following command

    <Info>This will prevent **dangerous roles** and **dangerous permissions** being given out.</Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke permissions (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke permissions on --do ban --command true
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-dp.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=2340cfd402abe9a81865a988c57872d5" width="366" height="136" data-path="images/antinuke/an-dp.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass channel delete prevention" icon="message-exclamation">
    To prevent **channels** being **mass deleted**, execute the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke channeldeletion (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke channeldeletion on --threshold 2 --do ban
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-cd.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=b2e961a1339c6ef9d36255a562bf4ae5" width="398" height="148" data-path="images/antinuke/an-cd.png" />
    </Frame>
  </Accordion>

  <Accordion title="Malicious webhooks prevention" icon="webhook">
    To prevent **malicious webhooks**, execute the following command

    <Info>
      This will watch for mass **creations** and **deletions**
    </Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke webhooks (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke webhooks on --do ban --threshold 1 --command true
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-wbh.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=0c8023f2fbc097ffe5c22a8de3c352a5" width="432" height="142" data-path="images/antinuke/an-wbh.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass role creation" icon="link">
    You may prevent **mass role creation** inside your server with the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke rolecreation (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke rolecreation on --do ban --threshold 2
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-rc.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=fe5d60cfb3989c69d8bc59653016c44a" width="358" height="148" data-path="images/antinuke/an-rc.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass channel create prevention" icon="message-exclamation">
    To prevent **mass channel creation**, execute the following command

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke channelcreation (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke channelcreation on --do ban --threshold 2
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-cc.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=430bc3793d9853b45fa79fcfb4d287be" width="390" height="152" data-path="images/antinuke/an-cc.png" />
    </Frame>
  </Accordion>

  <Accordion title="Malicious server change prevention" icon="server">
    To prevent **malicious server changes**, execute the following command

    <Warning>
      kyos will revert most server changes, however, things such as **vanity** and **icons** cannot be reverted automatically
    </Warning>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke server (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke server on --do stripstaff
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-server.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=9840273c8a77a587053ce950d7504e05" width="328" height="132" data-path="images/antinuke/an-server.png" />
    </Frame>
  </Accordion>

  <Accordion title="Mass mentioning" icon="person">
    To punish those **mass pinging**, execute the following command

    <Info>
      To block it before even being sent, we recommend your configure your server's **built-in Discord automod**
    </Info>

    <CodeGroup>
      ```javascript Syntax theme={null}
      ,antinuke mention (on/off) (parameters)
      ```

      ```javascript Example theme={null}
      ,antinuke mention on --do ban
      ```
    </CodeGroup>

    <br />

    <Frame>
      <img src="https://mintcdn.com/kyos-c60486ad/I5vQIDwxulOEOE4L/images/antinuke/an-mentions.png?fit=max&auto=format&n=I5vQIDwxulOEOE4L&q=85&s=2502250df6b73c9b2aeea5a6abed817f" width="344" height="136" data-path="images/antinuke/an-mentions.png" />
    </Frame>
  </Accordion>
</AccordionGroup>

## User Management Guide

To add antinuke admins, or whitelist users, follow this guide.

### Adding an antinuke admin

<Tabs />

To add a user as an antinuke admin, execute the `antinuke admin` command

<Info>
  To remove an antinuke admin, re-execute the command.
</Info>

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

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

### Whitelisting a user from the antinuke

<Tabs />

To whitelist a user from the antinuke, execute the `antinuke unwhitelist` command

<Info>
  To unwhitelist a user, do `antinuke unwhitelist (user)`
</Info>

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

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

### Viewing the antinuke admins

<Tabs />

View the antinuke admins

<Warning>
  Only the server owner may use this command
</Warning>

<CodeGroup>
  ```javascript Syntax theme={null}
  ,antinuke admins
  ```
</CodeGroup>

### Viewing the antinuke whitelisted users

<Tabs />

View the antinuke whitelisted users

<CodeGroup>
  ```javascript Syntax theme={null}
  ,antinuke whitelisted
  ```
</CodeGroup>

## Parameters

<Tabs />

You may use the following flags across the antinuke to configure each module

<Info>
  **NOTE:** Some modules may not support the `--threshold` or `--command` parameter. However, we urge you to use the `--command on` flag where applicable.
</Info>

<AccordionGroup>
  <Accordion title="Threshold">
    A threshold is the number of times somebody can do an action before triggering the antinuke.

    <CodeGroup>
      ```javascript Syntax theme={null}
      --threshold (digit)
      ```

      ```javascript Example theme={null}
      ,antinuke massban on --threshold 3
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Punishment">
    The punishment kyos will initiate once a user triggers the antinuke.

    ### Available punishments

    * `ban` - Bans the user from the server
    * `kick` - Kicks the user from the server
    * `stripstaff` - Removes a users roles
    * `jail` - Jails the user

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

      ```javascript Example theme={null}
      --do stripstaff
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Command Triggering">
    Dictates whether commands should contribute towards the threshold (eg. `kick`)

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

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

## Antinuke admins

<Tabs />

<Info>
  Only give this to **trusted administrators**
</Info>

Ensure you trust your antinuke admins as a server owner, kyos **will not** take action on them.

<Warning>
  Antinuke admins may do the following:
</Warning>

1. Edit thresholds
2. Configure triggers (such as **disabling** massban protection)
3. Hardban users (visit **help hardban**)
4. View your antinuke Configuration
5. Whitelist users from the antinuke (resulting in kyos **not** taking action against them)

<Check>
  They may **not** do the following:
</Check>

1. Disable or enable your antinuke
2. Add other antinuke admins
3. View the antinuke admins
