# Premium Discord AutoMod

{% hint style="info" %}
This feature requires a [premium subscription](/infinitybot-docs/basics/premium.md) to work.
{% endhint %}

{% hint style="success" %}
We also have a very advanced AutoMod Manager. You can learn more on the [AutoMod Manager page](/infinitybot-docs/automatic-moderation/automod-dashboard-manager.md). &#x20;
{% endhint %}

<figure><img src="/files/xkzNW1vX5rR2UnXqd9Kd" alt=""><figcaption></figcaption></figure>

## Setup Commands

{% hint style="warning" %}
**Discord** has a limit of 10 Auto Mod rules per server. Choose wisely!
{% endhint %}

### General Setup Command

With the `/automod setup` command you can set up the following with just one command:

* Commonly reported swear words
* Suspected spam content
* Mention spam
* All links
* Invite links
* @everyone, @here & @role mentions

### Custom Keyword

With the `/automod keyword` command you can block a custom word.

| Command Option Name | Function                                                      |
| ------------------- | ------------------------------------------------------------- |
| word                | In this option you can enter the word that you want to block. |

{% hint style="info" %}
You can only block one word with this command, we recommend using the [free AutoMod feature](/infinitybot-docs/automatic-moderation/old-discord-automod-manager.md) for custom words.
{% endhint %}

### Swear Words

You can block the most used swear words with the `/automod flagged-words` command.

### Mention Spam

You can block mention spam with the `/automod mention-spam` command.

| Command Option Name | Function                                                                                                                                  |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| number              | In this option you can enter the amount of mentions every message can have before being marked as mention spam. (We recommend 3 mentions) |

### Suspected Spam

You can block suspected spam content with the `/automod spam-messages` command.

### Invites

With the `/automod invites` you can block all invite links.

{% hint style="warning" %}
Users could still use a custom website link as invite link, we recommend you to also block all other links.
{% endhint %}

### All Links

You can block all links with the `/automod links` command.

### @everyone, @here & @role Mentions

You can block @everyone, @here & @role mentions with the `/automod mega-mentions` command.

### Emoji Spam

{% hint style="warning" %}
The emoji spam Auto Mod is still in development and may not fully work.
{% endhint %}

You can block emoji spam with the `/automod emoji-spam` command.

| Command Option Name | Function                                                                                      |
| ------------------- | --------------------------------------------------------------------------------------------- |
| number              | In this option you can select the max amount of emoji's per message. (We recommend 5 emoji's) |

### Non-English Characters

You can block non-English characters with the `/automod non-english-characters` command.

### Anti Ping

{% hint style="warning" %}
The anti ping Auto Mod is still in development and may not fully work.
{% endhint %}

You can set up the anti ping filter with the `/automod anti-ping` command.

| Command Option Name | Function                                                                                                                                                                                                                                 |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| user                | <p>In this option you can mention all users that you want to be unable to be pinged. Put every mention in between <code>''</code> and seperate every mention with a comma, for example:<br><code>'@user1', '@user2', '@user3'</code></p> |

### Profiles

You can prevent users from having swear words in their proile with the `/automod profiles` command.&#x20;

***

### Deleting an Auto Mod Rule

The AutoMod rules created with a command from InfinityBot are being created by InfinityBot, but in your server settings. This means that you can't disable or delete these rules with InfinityBot and that you will have to do it yourself.&#x20;

{% hint style="info" %}
You need to use a computer (or the browser version on mobile) to be able to delete AutoMod rules.&#x20;

You also need the `manage server` permission to be able to delete / edit AutoMod Rules.
{% endhint %}

{% stepper %}
{% step %}

#### Locating the Auto Mod Tab

You will now have to locate the AutoMod tab in your server. Click on the server name to get a little dropdown menu. Look for a tab that says "Server Settings ⚙️", press it and it will open up your server settings. In your server settings there will be a category called "Moderation", look for a tab called "AutoMod" under that category and press it, if you can't find the tab with that name, press "Safety Setup" and then the "Edit" button on the right of AutoMod.
{% endstep %}

{% step %}
You can now delete the rule. Depending on what rule it is, you will need to follow another action, please check out the rule types below.&#x20;
{% endstep %}
{% endstepper %}

#### Deleting (Mention) Spam & Flagged Words Rules

The first thing to note is that you can not delete Spam Mention rules in a community server. If you want to remove a Mention Spam rule in a community server, you will have to disable the rule, you can do that by turning of the switch symbol.&#x20;

Spam and Flagged Words rules can be deleted by pressing the 3 dots next to the switch symbol and then pressing "Delete Rule".

#### Deleting Rules from other commands

Rules from other commands, like (Invite) Links, Mega Mentions or rules created with the free command can be deleted like the rules above: press the 3 dots next to the switch symbol and press "Delete Rule".&#x20;

#### **Deleting parts of a Rule**

When you used the `/setup automod` command, there will be 1 rule created containing all other custom rules ((Invite) Links, Mega Mentions) to safe space. If you want to delete one of those parts, press the AutoMod Rule and delete the keyword that is used to block the word. For Invite links these keywords will be "discord.gg/" and "discord.com/invite", for Links the keyword will be "http" and for Mega Mentions the keywords will be "@everyone", "@here" and "<@&".

{% hint style="info" %}
Please note that this guide is only intended for AutoMod Rules created by InfinityBot, other rules may behave different.&#x20;

If you still fail to delete a rule created by InfinityBot, just create a support post in the support server, our team will be more than happy to help you there!
{% endhint %}

***

### AutoMod Errors

Errors that you may get can be very complicated. They can be very long and unclear, so we made a little guide on what they mean and what you can do about the most common errors:

1. **DiscordAPIError\[50035]: Invalid Form Body 0\[AUTO\_MODERATION\_MAX\_RULES\_OF\_TYPE\_EXCEEDED]: Maximum number of rules with trigger type 1/2/3/4/5 is 1/6**\
   This error means that you already have that rule or have reached Discord's limit of that specific rule. If you want to add a new one, you will have to delete an other rule of the same type.
2. **DiscordAPIError\[50013]: Missing Permissions**\
   This error means that InfinityBot² does not have permission to create an AutoMod rule. You can solve this error by giving InfinityBot² "manage\_server", "send\_messages" and "embed\_links" permission.
3. **You do not have permission to use that command!**\
   This means that you do not have the right permission to use that command. You need "administrator" permissions to use the AutoMod commands.
4. **There was an error while executing this command!**\
   This is just the general error message and it can mean a lot of things. If you get this error and don't know what the cause is, please join the support server with the link above.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infinitybot.gitbook.io/infinitybot-docs/moderation/premium-bot/premium-discord-automod.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
