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

# Discord AutoMod Filters

> Block words, links and patterns instantly with filters your character creates in Discord's built-in AutoMod, and check your character's own replies against them.

# Discord AutoMod Filters

**AutoMod** lets your character create filters in Discord's own AutoMod. Discord checks every message against them before it's posted, so filters work instantly and even while your character is offline. Use them for things that should always be blocked, like invite links, slurs or mass mentions, and let your character's [AI moderation](https://docs.aurinfer.com/Integrations/Discord/SERVER/moderation.md) handle anything that needs judgement.

**How to get here:**

> **Server** → **Moderation** → **Configuration** → **AutoMod** section

AutoMod is part of moderation, so set up [moderation](https://docs.aurinfer.com/Integrations/Discord/SERVER/moderation.md#set-up-moderation) for the server first.

***

## Before you start

AutoMod needs:

* Your character connected to Discord and in the server.
* The **Manage Server** permission on your character's role. Discord requires it for bots to create AutoMod rules.
* The **Timeout Members** permission, if any filter times members out. The dashboard calls it **Moderate Members**.

If something is missing, the AutoMod section shows a note with a button to fix it:

| Note | What to do |
| - | - |
| Connect your character to Discord first | Select **Open Discord settings** and finish the Discord connection. Saved filters are created in Discord once it's connected |
| Your character isn't in this server | Select **Invite** to add it |
| Needs the Manage Server permission | Select **Grant permission** to re-invite your character with the permission, then **Check again** |
| Filters with a timeout need the Moderate Members permission | Select **Grant permission** |
| Some filters don't match what's in Discord | Select **Sync now** to push your saved settings to Discord again |

> [!NOTE]
>
> Discord never applies AutoMod filters to members with the **Administrator** or **Manage Server** permission. To test a filter in your server, use an account without those permissions, or use **Try a message** in the dashboard.

***

## Turn AutoMod on

The **Discord AutoMod** switch controls whether Discord enforces your filters.

* **On**: Discord blocks matching messages instantly.
* **Off**: your filters stay saved, but Discord doesn't enforce them.

When you pause moderation for the server, AutoMod pauses with it. Discord's rules turn back on when you resume.

***

## Filters

The **Filters** list shows each filter with a short summary, its own on/off switch and a status. The counter under **Filters** shows two limits:

* How many custom filters this character has on the server, out of the number each character can have.
* How many custom AutoMod rules the server is using in Discord. Discord caps that number per server, and rules made by other bots count toward it.

There are two kinds of filters:

> [card] Custom filters
>
> Select **Add filter** to block your own words, phrases and patterns. A custom filter can also time members out.

> [card] Discord word lists
>
> Select **Discord word lists** to block the lists Discord maintains: **Profanity**, **Sexual Content** and **Insults and Slurs**.

A server can only have one rule that uses Discord's word lists. If another bot already created one, the **Discord word lists** button is unavailable. Edit that rule in Discord under **Server Settings** → **AutoMod** instead.

### Create a filter

**1. Start a filter**

Select **Add filter** or **Discord word lists**.

**2. Name it**

Give the filter a **Name**, for example "Invite links".

**3. Choose what to block**

For a custom filter, add **Blocked words** and **Patterns**. For a word list filter, tick the **Word lists** you want.

**4. Add exceptions**

Add **Allowed words**, and any roles or channels under **Exemptions**.

**5. Test it**

Type a sample message in **Try a message** to check what gets blocked.

**6. Choose what happens**

Set the message members see and whether Discord sends an alert or times the member out.

**7. Save**

Select **Create filter**. Your character creates the rule in Discord right away.

To change a filter later, select it in the list, edit it, and select **Save changes**. If you try to open another filter with unsaved edits, the dashboard asks whether to **Keep editing** or **Discard changes**.

### Blocked words

Type a word or phrase and press Enter, or paste a comma-separated or one-per-line list. Words match whole words. Add `*` to match part of a word:

| Entry | Blocks |
| - | - |
| `cat*` | Words that start with "cat", such as catapult |
| `*cat` | Words that end with "cat", such as bobcat |
| `*cat*` | Words that contain "cat" anywhere, such as concatenate |

### Patterns

Patterns are regular expressions in Discord's Rust syntax and ignore upper and lower case. Select **Add pattern** to write your own, or **Presets** to add ready-made ones:

| Preset group | Presets |
| - | - |
| **Links and Invites** | **Server invites**, **All links**, **Masked links**, **Disguised links** |
| **Spam and Formatting** | **Emoji spam**, **Mass mentions**, **All caps**, **Zalgo text**, **Braille art**, **Invisible characters**, **Headings**, **Subtext** |
| **Personal Info** | **Email addresses**, **Phone numbers**, **IP addresses** |
| **Hate Speech** | **Slur variants** |

Each preset shows a short description in the picker. The editor flags patterns that are invalid or too long before you save.

### Word lists

Discord keeps the **Profanity**, **Sexual Content** and **Insults and Slurs** lists up to date. Tick the ones this server should block.

### Allowed words

**Allowed words** never trigger the filter, even when they contain a blocked word. Use them for false positives, such as a town name that contains a blocked word.

### Try a message

Type a message to see whether the filter blocks it. Matches are highlighted, and the result shows **Blocked** or **Allowed**.

* Custom filters are tested in your browser with the same matching rules Discord uses, and nothing is sent.
* For word list filters, only **Insults and Slurs** can be previewed. The preview uses AurInfer's slur patterns, and Discord's own list may block more. Discord doesn't publish its **Profanity** and **Sexual Content** lists, so those can't be previewed.

### When a message is blocked

* **Message shown to the member**: a short note only the sender sees. Leave it empty to use Discord's default notice.
* **Send a Discord alert**: Discord posts the blocked message in your AutoMod log channel. Pick an **AutoMod Log Channel** first.
* **Time out the member** (custom filters only): Discord mutes the member as soon as the message is blocked. Choose **No timeout** or a length.

### Exemptions

Discord never applies the filter to the **Roles** and **Channels** you add here. Threads follow their parent channel.

Your moderation **Excluded Roles** are added to every filter automatically and count toward Discord's limit on exempt roles per filter. If adding a role would go over that limit, the dashboard tells you which filter to trim.

### Turn off or delete a filter

* Use the switch next to a filter to turn it off without deleting it.
* **Delete filter** removes the filter and its Discord AutoMod rule, so members can post those words again right away. Audit logs and warning history are kept.

### Filter status

If a filter and its rule in Discord get out of step, the filter shows a status:

| Status | Meaning |
| - | - |
| **Not in Discord** | The rule hasn't been created in Discord yet |
| **Deleted in Discord** | Someone deleted the rule in Discord |
| **Changed in Discord** | Someone turned the rule on or off in Discord |
| **Sync failed** | Discord rejected the last update. Hover over the status to see why |

Select **Sync now** in the note above the list to push your saved settings to Discord again.

***

## Your character's own replies

AurInfer also checks what your character says in the server against your filters: chat replies, Free Will messages and `/ask` answers. Blocked words and phrases are removed before the reply is sent. If nothing is left, no reply goes out. Each time this happens, **Audit Logs** records a **Reply filtered** entry showing the original reply and what was sent instead.

Your character's replies are checked against your custom filters' words and patterns, and against AurInfer's own slur patterns when **Insults and Slurs** is ticked. A few things aren't checked:

* **Profanity** and **Sexual Content**: Discord doesn't publish these lists, so the editor shows a note when you use them without **Insults and Slurs**.
* Patterns that Discord supports but AurInfer can't check: the editor marks these with a note.

***

## Logging

* **AutoMod Log Channel**: where Discord alerts and AurInfer log entries for AutoMod are posted. If you don't pick one, AutoMod uses your **Mod Log Channel**. Pick a different channel to keep AutoMod separate. Select the **X** to go back to using the Mod Log Channel.
* **Send Logs**: posts a detailed log message for every AutoMod action.

Every block and AutoMod timeout is also recorded in **Audit Logs** as **Blocked by AutoMod** or **AutoMod timeout**, and counts toward the member's AutoMod blocks on the **Warnings** page. See [Audit Logs](https://docs.aurinfer.com/Integrations/Discord/SERVER/moderation.md#audit-logs).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.