> For the complete documentation index, see [llms.txt](https://infinitybot.gitbook.io/infinitybot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitybot.gitbook.io/infinitybot-docs/moderation/anti-nuke/anti-raid-commands.md).

# Anti Raid Commands

Anti Raid will protect your server from user raids and spammers.

## Setup Commands

### General Setup Command

With the `/setup antiraid` command you can get a guide to set up most stuff from the Anti Raid system. Below is a list of things that are automatically enabled when you use the command:

#### Anti Spam

The Anti Raid system includes an advanced Anti Spam system, you can toggle the system with the `/toggle anti-spam` command. The Anti Spam system will be enabled by default when you enable Anti Raid.&#x20;

Anti Spam will be triggered when:

* A user sends a lot of messages in a short amount of time.
* Sends a lot of the same messages in a row.
* Sends a wall of text.
* If a user is mentioning @everyone, @here or a role too many times.
* A few other things.

#### Join Gate

The Anti Raid system also includes a join gate system. This system will be triggered when a lot of users join in a short amount of time. When it triggers, it will mention the selected [emergency role](#emergency-ping-role) and put the server in lock down.

### Anti Raid Log Channel

With the `/setup anti-raid-log-channel` command you can select a specific log channel for the Anti Raid system. If you did not select one, all Anti Raid logs will be send to the [Anti Nuke log channel](/infinitybot-docs/moderation/anti-nuke/antinuke-setup.md#set-up-a-log-channel).

| Command Option Name | Function                                                             |
| ------------------- | -------------------------------------------------------------------- |
| action              | With this option, you can select what action you want to take.       |
| channel             | With this option you can select your new log channel for the system. |

### Emergency Ping Role

You can set up an emergency ping role with the `/setup antiraid-ping-role` command. This role will be pinged by the bot if a raid is suspected to happen.

| Command Option Name | Function                                                                                                             |
| ------------------- | -------------------------------------------------------------------------------------------------------------------- |
| action              | With this option, you can select what action you want to take. You can select a new role or remove an old selection. |
| role                | With this option you can select your new emergency ping role.                                                        |

### Mention @everyone Permission

With the `/setup perm-mention-everyone` command you can select a role that you want to allow to mention @everyone, @here and all roles. Users with this role will be limited to ping @everyone once every hour, meaning they can not raid your server with @everyone mentions. You can also select a custom max amount of @everyone mentions done with [this command](/infinitybot-docs/moderation/anti-nuke/antinuke-setup.md#set-up-a-max).

| Command Option Name   | Function                                                                                                             |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- |
| action                | With this option, you can select what action you want to take. You can select a new role or remove an old selection. |
| mention-everyone-role | With this option you can select the role that you want to allow to mention @everyone.                                |

{% hint style="danger" %}
ALL users with the selected role will be able to mention @everyone, @here and all roles.

You should only select admin roles for this permission.
{% endhint %}

### Anti Mention Spam

You can aslo set up an extra layer of protection against mention spam with the `/setup anti-mention-spam` command. The command will check if your server already has the protection and create it if you don't have it.

![](https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FDQIHgOZT7Mc3hdbmZ4DP%2Fimage.png?alt=media\&token=2232b46c-6ab6-4fd5-81c5-3990fc5d66ae)

## Anti Raid Toggle Commands

| Command Name       | Function                                |
| ------------------ | --------------------------------------- |
| `/antiraid on-off` | Enable or disable the Anti Raid system. |

## Anti Raid Action Commands

### Mention @everyone

With the `/mention-everyone` command user who have the [mention @everyone permission](#mention-everyone-permission) will be able to ping @everyone, @here or a role.

| Command Option Name | Function                                                                                                                                                                                                       |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| action              | With this option you can select whether you want to mention @everyone, @here, or a role. If you want to mention a role you also need to enter the role in the second option.                                   |
| role                | With this option you can select a role that you want to mention if you have selected this in your action.                                                                                                      |
| message-id          | With this option you can let the bot react to another message on ID. If you don't know how to get a message ID, check out [this page](/infinitybot-docs/guides/discord-guides/how-to-get-an-id-on-discord.md). |

## Verification

The Anti Raid system has a verification system that makes it harder for user bot raiders to join and raid your server.&#x20;

### Setup Verification

You can use the `/setup verification` command to set up the verification system.

| Command Option Name  | Function                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------ |
| action               | In this option you can select what action you would like to take.                                                  |
| unverified-role      | In this option you can select the role that unverified users should get. This role will be added to users on join. |
| verified-role        | In this option you can select the role that users should get when they successfully verify.                        |
| verification-channel | In this option you can select the channel where you want to allow to verify users.                                 |
| log-channel          | In this option you can select the channel where you want to have verification logs send.                           |

### Manage Verifications Permission

You can select a role that can manage verifications with the `/setup perm-verify` command.

| Command Option Name | Function                                                                               |
| ------------------- | -------------------------------------------------------------------------------------- |
| action              | In this option you can select what action you would like to take.                      |
| manage-verify-role  | In this option you can select the role that you want to allow to manage verifications. |

### Verify a User Manually

You can verify a user manually with the `/verify manual` command. Users with the [manage verifications](#manage-verifications-permission) permission can use this command.

| Command Option Name | Function                                                        |
| ------------------- | --------------------------------------------------------------- |
| user                | In this option you can select the user that you want to verify. |

### Sync a Channel

You can sync a channel with the `/verify sync-channel` command. Unverified users will no longer be able to send messages when a channel has been synced.

| Command Option Name | Function                                                         |
| ------------------- | ---------------------------------------------------------------- |
| channel             | In this option you can select the channel that you want to sync. |

### Other Verification Features

The verification system has a few other features that are used without command. You can view the most important ones below!

#### Add Unverified Role on Join

The [unverified role](#setup-verification) will be added to all new users when they join. This role will be removed when they verify themselves or when they get verified.

{% hint style="warning" %}
Make sure you disable the [auto-role](/infinitybot-docs/onboarding/auto-role.md) feature from the normal InfinityBot as this feature may add roles to unverified users that may cause users to be able to talk before they verified themselves.
{% endhint %}

#### Prevent Messages by Unverified Users

InfinityBot will delete any message send by an unverified user. You can also [sync](#sync-a-channel) a channel to make sure unverified users can no longer send messages there.

#### Server Lockdown Effect on Verification

When you [lock down](/infinitybot-docs/moderation/anti-nuke/lockdown-commands.md#general-server-lockdown) the server new users will no longer be able to verify. Manual verification will still work. This effect will be removed when you remove the lockdown.&#x20;

***

#### [Back to main AntiNuke page](/infinitybot-docs/moderation/anti-nuke.md)
