> 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/automatic-moderation/anti-spam.md).

# Anti Spam

The anti spam system prevents users from spamming in your server.

{% hint style="success" icon="lightbulb-on" %}
The Anti Nuke bot also has this feature. It may be of better quality and may have a faster response time. You can check it out [here](/infinitybot-docs/moderation/anti-nuke/anti-raid-commands.md#anti-spam).
{% endhint %}

## Setup

You can set up the anti spam system with the `/setup antispam` command.

| Command Option Name | Function                                                                                                               |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| action              | In this option you can select the action that you would like to take. To enable the system, select "Enable anti-spam". |
| log-channel         | In this option you can select a log channel. If a user triggers the anti spam system it will be logged here.           |
| timeout-length      | In this option you can select the default length of the timeout given to users when they trigger the system.           |
| ignore-channel      | In this option you can optionally select a channel that antispam should ignore.                                        |
| ignore-role         | In this option you can optionally select a role that antispam should ignore.                                           |

{% hint style="info" %}
Users with the manage server permissions are always whitelisted from the anti spam system and can't trigger it.
{% endhint %}

### Antispam Triggers

Antispam triggers on the following spam-types:

* Message spam, a lot of messages in a short amount of time
* Simular messages, a lot of the same messages in a short amount of time
* Mention spam, a lot of (role) mentions in the same or other messages
* Some other types of spam

### Demonstration

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2Fhv2NqGlsq3aNjArOUxE4%2Fezgif-5cd001f5f8bbbe.gif?alt=media&amp;token=c3e3742b-561f-42d7-88e8-3a09592000d9" alt="" width="563"><figcaption></figcaption></figure>
