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

# automod

Rule-based message filter running on every incoming message.

## Match types

Every rule uses one of two match strategies:

* **Wordlist** — up to 100 phrases (max 80 chars each), matched case-insensitively against the message content.
* **Regex** — a single JavaScript-style regex pattern (validated server-side; malformed patterns are rejected at save time).

## Actions

Pick one action per rule:

| Action           | What happens on a match                                |
| ---------------- | ------------------------------------------------------ |
| `delete`         | Remove the message.                                    |
| `warn`           | DM the author a warning (message stays).               |
| `timeout`        | Discord timeout for `timeout_minutes` (message stays). |
| `delete_warn`    | Delete + DM warning.                                   |
| `delete_timeout` | Delete + timeout.                                      |

## Exemptions

Per rule you can whitelist up to 25 **channel IDs** and 25 **role IDs** that bypass this rule entirely. A member with ANY exempt role is skipped; messages posted in ANY exempt channel are skipped.

## Recent triggers

Every match is logged with:

* Rule name
* Matched text (the exact substring or full pattern hit)
* 100-char message snippet
* Channel + user
* Timestamp + action taken

The dashboard shows the last 100 triggers per rule in a live feed so you can tune false-positives without tail-following logs.

## Runtime behaviour

* 30-second per-guild rule cache — dashboard edits invalidate it immediately (no wait for propagation).
* Owner immunity + role/channel exemptions are always evaluated before the pattern check runs.
* The bot needs **Manage Messages** to delete and **Moderate Members** to timeout. Missing permissions are surfaced in the trigger log entry so you know why an action didn't fire.
