> ## 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.

# Modules

> Configure each filter module — enable, set thresholds, exempt roles, and assign a log channel.

# Modules

> Configure each filter module — enable, set thresholds, exempt roles, and assign a log channel.

## Command structure

Every module follows the same pattern:

```bash theme={null} theme={null}
;filter (module) [#log-channel] [on | off] [threshold]
;filter (module) exempt (@role)
;filter (module) exempt list
;filter (module) logs (#channel)
;filter (module) logs remove
;filter (module) logs view
;filter punishment (module) (delete | timeout | warn | kick | ban) [duration]
```

The log channel and threshold are optional — you can enable a module with just `on` and configure the rest later. Every module deletes by default; see [Punishments](/server-config/filter/overview#punishments) to also warn, timeout, kick, or ban.

***

<AccordionGroup>
  <Accordion icon="message" title="Spam">
    Delete messages from members sending too fast.

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter spam #mod-log on 5
        ```

        Enables spam filter, logs to `#mod-log`, triggers at **5 messages in 5 seconds**.
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter spam [#channel] [on | off] [threshold]
        ```

        `threshold` — number of messages in 5 s before action (2–20, default 5)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter spam off
        ```
      </Tab>
    </Tabs>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter spam exempt @Moderators
      ;filter spam exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter spam logs #mod-log
      ;filter spam logs remove
      ;filter spam logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="comment-slash" title="Chat Spam">
    Punish members who flood **low-effort** messages without engaging with anyone.

    Unlike `spam`, this one doesn't fire on speed alone. Once a member crosses the threshold inside the window, the burst must also match at least one abuse pattern:

    * **Repetition** — the same message over and over
    * **Cross-channel** — the same flood spread across 3 or more channels
    * **Gibberish** — very short, keysmash, or unspaced walls of text

    And it never fires if the member engaged: if any message in the burst is a reply or pings another human, the burst is ignored.

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter chatspam #mod-log on 10 15
        ```

        Enables chat-spam filter, logs to `#mod-log`, triggers at **10 low-effort messages in 15 seconds**.
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter chatspam [#channel] [on | off] [threshold] [window]
        ```

        `threshold` — messages in the window (4–100, default 10)

        `window` — seconds to measure over (5–300, default 15)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter chatspam off
        ```
      </Tab>
    </Tabs>

    <Note>
      Chat spam has no `exempt` or `logs` subcommands — set its log channel inline when enabling it, or rely on `;filter globallog`.
    </Note>

    <Tip>
      Pair it with a punishment — deleting a flood alone rarely stops the flooder:

      ```bash theme={null} theme={null}
      ;filter punishment chatspam warn
      ```
    </Tip>
  </Accordion>

  <Accordion icon="link" title="Invites">
    Delete any message containing a Discord invite link.

    <CodeGroup>
      ```bash Enable theme={null} theme={null}
      ;filter invites #mod-log on
      ```

      ```bash Syntax theme={null} theme={null}
      ;filter invites [#channel] [on | off]
      ```

      ```bash Disable theme={null} theme={null}
      ;filter invites off
      ```
    </CodeGroup>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter invites exempt @Moderators
      ;filter invites exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter invites logs #mod-log
      ;filter invites logs remove
      ;filter invites logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="globe" title="Links">
    Delete any message containing an external URL.

    <CodeGroup>
      ```bash Enable theme={null} theme={null}
      ;filter links #mod-log on
      ```

      ```bash Syntax theme={null} theme={null}
      ;filter links [#channel] [on | off]
      ```

      ```bash Disable theme={null} theme={null}
      ;filter links off
      ```
    </CodeGroup>

    <Expandable title="Whitelist a domain">
      Allow specific domains through while blocking everything else.

      ```bash theme={null} theme={null}
      ;filter links whitelist discord.com
      ;filter links whitelist youtube.com
      ```
    </Expandable>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter links exempt @Moderators
      ;filter links exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter links logs #mod-log
      ;filter links logs remove
      ;filter links logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="font" title="Caps">
    Delete messages that exceed a percentage of uppercase characters.

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter caps #mod-log on 70
        ```

        Triggers when a message is **70% or more** uppercase (minimum 6 letters).
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter caps [#channel] [on | off] [threshold]
        ```

        `threshold` — percentage of uppercase characters (1–100, default 70)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter caps off
        ```
      </Tab>
    </Tabs>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter caps exempt @Moderators
      ;filter caps exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter caps logs #mod-log
      ;filter caps logs remove
      ;filter caps logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="at" title="Mass Mention">
    Delete messages that ping too many unique users.

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter massmention #mod-log on 5
        ```

        Triggers when a message mentions **5 or more** unique users.
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter massmention [#channel] [on | off] [threshold]
        ```

        `threshold` — number of unique mentions (1–30, default 5)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter massmention off
        ```
      </Tab>
    </Tabs>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter massmention exempt @Moderators
      ;filter massmention exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter massmention logs #mod-log
      ;filter massmention logs remove
      ;filter massmention logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="face-smile" title="Emoji">
    Delete messages that contain too many emojis (custom and Unicode).

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter emoji #mod-log on 10
        ```

        Triggers when a message contains **10 or more** emojis.
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter emoji [#channel] [on | off] [threshold]
        ```

        `threshold` — total emoji count (1–50, default 10)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter emoji off
        ```
      </Tab>
    </Tabs>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter emoji exempt @Moderators
      ;filter emoji exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter emoji logs #mod-log
      ;filter emoji logs remove
      ;filter emoji logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="eye-slash" title="Spoilers">
    Delete messages with too many spoiler blocks.

    <Tabs>
      <Tab title="Enable">
        ```bash theme={null} theme={null}
        ;filter spoilers #mod-log on 3
        ```

        Triggers when a message contains **3 or more** `||spoiler||` blocks.
      </Tab>

      <Tab title="Syntax">
        ```bash theme={null} theme={null}
        ;filter spoilers [#channel] [on | off] [threshold]
        ```

        `threshold` — number of spoiler blocks (1–20, default 3)
      </Tab>

      <Tab title="Disable">
        ```bash theme={null} theme={null}
        ;filter spoilers off
        ```
      </Tab>
    </Tabs>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter spoilers exempt @Moderators
      ;filter spoilers exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter spoilers logs #mod-log
      ;filter spoilers logs remove
      ;filter spoilers logs view
      ```
    </Expandable>
  </Accordion>

  <Accordion icon="music" title="Music Files">
    Delete any message with an attached music file (`.mp3`, `.flac`, `.wav`, `.ogg`, `.m4a`, `.aac`, `.opus`, `.wma`, `.aiff`, `.alac`).

    <CodeGroup>
      ```bash Enable theme={null} theme={null}
      ;filter musicfiles #mod-log on
      ```

      ```bash Syntax theme={null} theme={null}
      ;filter musicfiles [#channel] [on | off]
      ```

      ```bash Disable theme={null} theme={null}
      ;filter musicfiles off
      ```
    </CodeGroup>

    <Expandable title="Exempt a role">
      ```bash theme={null} theme={null}
      ;filter musicfiles exempt @Moderators
      ;filter musicfiles exempt list
      ```
    </Expandable>

    <Expandable title="Log channel">
      ```bash theme={null} theme={null}
      ;filter musicfiles logs #mod-log
      ;filter musicfiles logs remove
      ;filter musicfiles logs view
      ```
    </Expandable>
  </Accordion>
</AccordionGroup>
