> For the complete documentation index, see [llms.txt](https://docs.asagi.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.asagi.xyz/server-control/moderation/auto-moderation.md).

# Auto Moderation

Auto Moderation watches new messages for selected types of content and responds according to the rules you configure.

Everything on this page is configured from **Dashboard → Server Control → Moderation → Automod**.

### Set Up a Filter

1. Open **Moderation** and select **Automod**.
2. Enable the filter you want to use.
3. Open its settings.
4. Configure its exceptions, notifications, and punishment.
5. Save your changes.

> 🎬 **Set up an Auto Moderation filter**
>
> See how to enable a filter and choose what happens when a message violates it.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hy8ldYgZJ9GQJFAuYLR%2Fuploads%2Ftg2HubMDJ7XAmqr2CTCv%2Fauto%20moderation%20set%20up.mp4?alt=media&token=c82826e5-f007-4a42-b7f9-3b6f77a13f82>" %}

> **Important:** new filter settings use **Timeout for 15 minutes** as the default punishment. Review the **Punishment** section before relying on a newly enabled filter.

### Available Filters

| Filter                         | What it detects                                              |
| ------------------------------ | ------------------------------------------------------------ |
| **Links**                      | Messages containing links                                    |
| **Discord Server Invitations** | Discord server invite links                                  |
| **Zalgo Text**                 | Text containing excessive combining characters               |
| **Redirecting Links**          | Links that redirect to another destination                   |
| **Scam and Phishing Links**    | Links identified as known malicious or phishing destinations |
| **Message Lines**              | Messages that reach the configured number of lines           |
| **Mentions**                   | Messages that reach the configured number of mentions        |

Bot messages are ignored by Auto Moderation.

For **Message Lines** and **Mentions**, you can choose a threshold from **1 to 999**. The rule triggers when a message reaches or exceeds that value.

The Mentions filter counts member, role, and channel mentions, including `@everyone` and `@here`.

### Configure What Happens

Each filter can use the same main controls.

#### Delete the Message

Enable **Delete messages that violate rule** to remove a message after it is detected.

Asagi needs **Manage Messages** in the channel.

#### Ignore Channels and Roles

Use **Ignore Channels** or **Ignore Roles** when a rule should not apply everywhere.

If a member has any ignored role, that filter is skipped for their message. Messages sent in ignored channels are skipped as well.

#### Notify the Member

Enable **Notify member about violation** to explain why the message was caught.

You can send the notification:

* by **DM**;
* in the **Channel** where the violation happened.

The notification can use custom content or a saved **Embed Message** template.

#### Apply a Punishment

Choose one punishment:

* **Timeout** — with a custom duration;
* **Kick**;
* **Ban**.

Asagi must have the matching Discord permission, and Discord role hierarchy must allow the action.

### Using Multiple Link Filters

The link-related filters can overlap. For example, a Discord invite or a known phishing URL is still a link.

If the same message matches several enabled filters, more than one rule can react to it. Configure the filters together so their notifications and punishments do not conflict.

### Example Result

> 🖼️ **Auto Moderation response**
>
> A member notification explains that their message violated one of the server's configured rules.

<figure><img src="https://3927572991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Hy8ldYgZJ9GQJFAuYLR%2Fuploads%2F3aNYvMO7eHfgbkOpmwSY%2Fmoderation_message_padded_lossless.webp?alt=media&amp;token=5e25ee91-31a5-4107-8c75-64402af101a3" alt=""><figcaption></figcaption></figure>

### Troubleshooting

If a rule detects messages but cannot complete an action, check the relevant Discord permissions and role hierarchy.

Common requirements include:

* **Manage Messages** for deleting messages;
* **Moderate Members** for Timeout;
* **Kick Members** for Kick;
* **Ban Members** for Ban;
* permission to view and send messages in the channel when using a channel notification.

If Discord rejects an action because permissions or a configured target are no longer valid, Asagi can surface the issue through dashboard notifications.

### Where to Go Next

Continue with [**Audit Logs**](https://docs.asagi.xyz/server-control/moderation/audit-logs.md) to record important server events in dedicated channels.
