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

# Overview

> raze's built-in message filter — automatically delete rule-breaking content and log violations.

# Overview

> raze's built-in message filter — automatically delete rule-breaking content and log violations.

## What is the Filter?

The filter system automatically scans every message sent in your server and deletes content that breaks your rules. Each module is independent — enable only what you need, configure thresholds, exempt trusted roles, and send logs to a dedicated channel.

All filter commands require the **Manage Channels** permission or a [Fake Permission](/security/fakepermissions) equivalent.

<Info>
  Messages from bots and members with **Manage Server** are never filtered.
</Info>

## Modules at a glance

| Module        | What it catches                              | Configurable threshold        |
| ------------- | -------------------------------------------- | ----------------------------- |
| `spam`        | Too many messages in a time window           | ✓ (2–100 msgs, 1–300s window) |
| `chatspam`    | Low-effort message floods with no engagement | ✓ (4–100 msgs, 5–300s window) |
| `invites`     | Discord invite links                         | —                             |
| `links`       | Any external URL                             | —                             |
| `caps`        | Excessive uppercase                          | ✓ (1–100%)                    |
| `massmention` | Mass user pings                              | ✓ (1–30 mentions)             |
| `emoji`       | Emoji floods                                 | ✓ (1–50 emojis)               |
| `spoilers`    | Spoiler tag abuse                            | ✓ (1–20 blocks)               |
| `musicfiles`  | Music file attachments                       | —                             |
| `words`       | Custom word/regex list                       | —                             |

## Global log channel

Set a fallback log channel used by every filter module that doesn't have its own log channel configured.

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;filter globallog (#channel)
  ```

  ```bash Example theme={null} theme={null}
  ;filter globallog #mod-log
  ```

  ```bash Remove theme={null} theme={null}
  ;filter globallog remove
  ```
</CodeGroup>

<Info>
  Per-module log channels take priority. The global log channel only receives violations from modules with no log channel of their own.
</Info>

## View configuration

```bash theme={null} theme={null}
;filter config
```

Shows every filter module — enabled/disabled status, threshold (where applicable), exempt roles, and assigned log channel.

***

## Punishments

By default a filter module only deletes the offending message. Set a punishment to also act on the member.

<Tabs>
  <Tab title="Syntax">
    ```bash theme={null} theme={null}
    ;filter punishment (module) (delete | timeout | warn | kick | ban) [duration]
    ```
  </Tab>

  <Tab title="Example">
    ```bash theme={null} theme={null}
    ;filter punishment chatspam warn
    ;filter punishment spam timeout 300
    ```

    Chat-spam offenders get a warn; spam offenders get a 5-minute timeout.
  </Tab>
</Tabs>

| Punishment | Effect                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------------- |
| `delete`   | Delete the message only — default                                                                             |
| `timeout`  | Delete, then time the member out. `duration` in seconds (default `600`)                                       |
| `warn`     | Delete, then issue a warn — goes through the normal warn system, including any warn actions you've configured |
| `kick`     | Delete, then kick the member                                                                                  |
| `ban`      | Delete, then ban the member (no message purge)                                                                |

Applies to `caps`, `spam`, `chatspam`, `spoilers`, `massmention`, `emoji`, `invites`, `links`, and `musicfiles`.

<Note>
  `;filter punishment` requires **Manage Server** (or the Fake Permission equivalent) — stricter than the rest of the filter commands. `duration` is only used by `timeout`.
</Note>

<Tip>
  `warn` is the strongest option — it stacks with your warn thresholds, so repeat automod offenders escalate to whatever punishment your warn actions define instead of being punished identically every time.
</Tip>

***

## Heat Automod

Instead of punishing a single message, heat tracks a running score per member. Every filter violation adds heat; heat **decays over time**, so occasional slip-ups fade away. When a member's heat crosses the max, they collect a **strike** — and once strikes hit the cap, raze automatically times them out.

<CodeGroup>
  ```bash Enable theme={null} theme={null}
  ;filter heat enable
  ```

  ```bash Disable theme={null} theme={null}
  ;filter heat disable
  ```
</CodeGroup>

### Configure

```bash theme={null} theme={null}
;filter heat config (max_heat) (decay_rate) (strikes_cap)
```

All three values are optional — pass only the ones you want to change.

| Setting       | Default | Description                         |
| ------------- | ------- | ----------------------------------- |
| `max_heat`    | `100`   | Heat needed to earn a strike        |
| `decay_rate`  | `10`    | Heat removed every 10 seconds       |
| `strikes_cap` | `3`     | Strikes before an automatic timeout |

<Tabs>
  <Tab title="View config">
    ```bash theme={null} theme={null}
    ;filter heat
    ```

    Run with no subcommand to see the current max heat, decay rate, and strikes cap.
  </Tab>

  <Tab title="Example">
    ```bash theme={null} theme={null}
    ;filter heat config 150 5 4
    ```

    Members can build more heat before a strike, heat decays slower, and it takes 4 strikes to trigger a timeout.
  </Tab>
</Tabs>

<Tip>
  Heat pairs well with lenient per-module settings — let individual violations slide, but catch members who break many rules in a short burst.
</Tip>

***

## Snipe configuration

Control which message types are stored by the snipe command.

<CodeGroup>
  ```bash Syntax theme={null} theme={null}
  ;filter snipe (delete | edit | purge)
  ```

  ```bash Example theme={null} theme={null}
  ;filter snipe delete
  ```
</CodeGroup>

| Type     | Stores                       |
| -------- | ---------------------------- |
| `delete` | Deleted messages             |
| `edit`   | Message edits (before/after) |
| `purge`  | Bulk-deleted messages        |

## How logging works

Every module has its own log channel. When a violation is caught the bot sends an embed showing:

* **Module** — which filter triggered
* **Author** — who sent the message
* **Reason** — what was detected
* **Channel** — where it happened

<Warning>
  If you point multiple modules at the same log channel and abuse is heavy, the bot rate-limits itself to **1 log per second** per channel. Any violations that couldn't be logged are counted and shown as **Suppressed: x violations** on the next log that gets through.
</Warning>
