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

# Automod

> Configurable message filtering with bot-side modules and Discord native AutoMod rules

## Overview

Automod is a dual-layer content moderation system that combines custom bot-side filtering with Discord's native AutoMod rules. Bot-side modules handle spam, caps, emoji abuse, duplicate messages, link filtering, mass mentions, anti-everyone pings, and long message detection with configurable thresholds and punishments. Native rules offload invite blocking, slur detection, and word filtering directly to Discord's infrastructure.

Both layers are managed from a single control panel and share a unified exemption system, giving you granular control over what gets filtered and who is exempt.

***

## How It Works

Bot-side modules monitor every message in real time. When a message violates an enabled rule, the configured punishment is applied immediately. Native modules create and manage Discord AutoMod rules on your behalf, which are enforced by Discord itself regardless of bot uptime.

Both systems share the same exemption model — roles and channels exempted from a module are respected whether the module is bot-side or native.

<Warning>
  Discord limits servers to **6 keyword AutoMod rules**. Native modules like Word Filter, Invite Links, and Slurs each consume one slot. If you hit the limit, delete an existing rule in **Server Settings → Safety Setup** to make room.
</Warning>

***

## Access Control

* **Manage Server** — Required to use all Automod commands

***

## Commands

<AccordionGroup>
  <Accordion title="automod" icon="robot">
    Opens the Automod interactive control panel. Toggle all bot-side and native modules from one interface, set the log channel, and configure punishments.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod
      ```

      ```bash Example theme={null}
      ,automod
      ```
    </CodeGroup>

    **Aliases:** `am`, `automoderation`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod spam" icon="message">
    Detects and punishes message spam. Threshold is the number of messages, interval is the time window in seconds.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod spam enable/disable
      ,automod spam [#channel] <count> <interval>
      ```

      ```bash Example theme={null}
      ,automod spam enable
      ,automod spam 5 10s
      ,automod spam #general 5 10s
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod caps" icon="font">
    Blocks messages exceeding a set percentage of uppercase characters.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod caps enable/disable
      ,automod caps [#channel] <percent>
      ```

      ```bash Example theme={null}
      ,automod caps enable
      ,automod caps 70
      ,automod caps #general 80
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod emoji" icon="face-smile">
    Blocks messages containing more than the configured number of emojis.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod emoji enable/disable
      ,automod emoji [#channel] <count>
      ```

      ```bash Example theme={null}
      ,automod emoji enable
      ,automod emoji 8
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod duplicate" icon="copy">
    Blocks users from sending the same message repeatedly within a short window.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod duplicate enable/disable
      ,automod duplicate [#channel] <count>
      ```

      ```bash Example theme={null}
      ,automod duplicate enable
      ,automod duplicate 3
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod links" icon="link">
    Blocks all external links server-wide or in a specific channel. Links to your own server's invites are always allowed.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod links enable/disable
      ,automod links [#channel]
      ,automod links whitelist add <domain>
      ,automod links whitelist remove <domain>
      ,automod links whitelist list
      ,automod links whitelist clear
      ```

      ```bash Example theme={null}
      ,automod links enable
      ,automod links #general
      ,automod links whitelist add youtube.com
      ,automod links whitelist remove youtube.com
      ,automod links whitelist list
      ,automod links whitelist clear
      ```
    </CodeGroup>

    Use the whitelist to allow specific domains through the filter without disabling the module entirely.

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod mentions" icon="at">
    Blocks messages that mention more than the configured number of users or roles at once.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod mentions enable/disable
      ,automod mentions [#channel] <count>
      ```

      ```bash Example theme={null}
      ,automod mentions enable
      ,automod mentions 5
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod antieveryone" icon="bullhorn">
    Deletes any message that pings @everyone or @here. The default punishment is `delete+strip`. Can be scoped to a specific channel.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod antieveryone enable/disable
      ,automod antieveryone [#channel]
      ```

      ```bash Example theme={null}
      ,automod antieveryone enable
      ,automod antieveryone #announcements
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod messagelines" icon="align-left">
    Blocks messages that contain too many line breaks or exceed a character length threshold. Useful for preventing wall-of-text spam.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod messagelines enable/disable
      ,automod messagelines <lines> <chars>
      ```

      ```bash Example theme={null}
      ,automod messagelines enable
      ,automod messagelines 6 1500
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod word" icon="filter">
    Manages the blocked word list using Discord's native AutoMod keyword rule. Automatically catches common bypasses like leet speak, spaced letters, and repeated characters. Supports adding multiple words at once using comma separation.

    <Warning>
      Word filter changes sync directly to Discord's AutoMod rule in real time. The rule is created automatically on first use.
    </Warning>

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod word add <word1, word2, word3>
      ,automod word remove <word>
      ,automod word list [page]
      ,automod word clear
      ```

      ```bash Example theme={null}
      ,automod word add badword
      ,automod word add word1, word2, word3
      ,automod word remove badword
      ,automod word list
      ,automod word clear
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod invites" icon="ticket">
    Creates a Discord native AutoMod rule that blocks invite links. Use `enable` and `disable` to toggle the rule on and off.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod invites enable/disable
      ```

      ```bash Example theme={null}
      ,automod invites enable
      ,automod invites disable
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod slurs" icon="ban">
    Creates a Discord native AutoMod rule that blocks slurs and hate speech. Use `enable` and `disable` to toggle the rule on and off.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod slurs enable/disable
      ```

      ```bash Example theme={null}
      ,automod slurs enable
      ,automod slurs disable
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod punishment" icon="gavel">
    Sets the punishment for a specific module. Bot-side modules support combining punishments with `+`. Native modules support a single additional action on top of the message block.

    Valid punishments: `delete`, `mute`, `kick`, `ban`, `strip`

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod punishment <module> <punishment[+punishment]>
      ```

      ```bash Example theme={null}
      ,automod punishment spam delete+mute
      ,automod punishment caps delete
      ,automod punishment invites kick
      ,automod punishment antieveryone delete+strip
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod duration" icon="clock">
    Sets the mute duration for modules that use mute as their punishment. Accepts seconds (`s`), minutes (`m`), or hours (`h`).

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod duration <module> <30s/5m/1h>
      ```

      ```bash Example theme={null}
      ,automod duration spam 5m
      ,automod duration invites 1h
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod exempt" icon="shield-check">
    Exempts a role or channel from a specific module. Works for both bot-side and native modules. Run with `remove` to undo.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod <module> exempt [@role/#channel]
      ,automod <module> exempt remove [@role/#channel]
      ,automod exempt list
      ```

      ```bash Example theme={null}
      ,automod spam exempt @Mods
      ,automod spam exempt remove @Mods
      ,automod caps exempt #bot-commands
      ,automod exempt list
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod setlog" icon="scroll">
    Sets the channel where all Automod actions are logged.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod setlog #channel
      ```

      ```bash Example theme={null}
      ,automod setlog #mod-logs
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="automod status" icon="list-check">
    Shows the current configuration of all modules including enabled state, thresholds, punishments, and active channels.

    <CodeGroup>
      ```bash Syntax theme={null}
      ,automod status
      ```

      ```bash Example theme={null}
      ,automod status
      ```
    </CodeGroup>

    **Permissions:** Manage Server
  </Accordion>
</AccordionGroup>

***

## Module Overview

### Bot-Side Modules

These run directly through the bot and support full threshold, punishment, channel, and exemption configuration.

<CardGroup cols={2}>
  <Card title="Spam Detection" icon="message">
    Detects users sending messages too rapidly. Configurable message count and time window
  </Card>

  <Card title="Caps Spam" icon="font">
    Blocks messages exceeding a configured percentage of uppercase characters
  </Card>

  <Card title="Emoji Spam" icon="face-smile">
    Blocks messages containing more emojis than the configured limit
  </Card>

  <Card title="Duplicate Messages" icon="copy">
    Prevents users from repeatedly sending identical messages
  </Card>

  <Card title="Link Filter" icon="link">
    Blocks all external links. Server's own invite links are always allowed. Supports a per-domain whitelist
  </Card>

  <Card title="Mass Mentions" icon="at">
    Blocks messages that exceed the configured number of user or role mentions
  </Card>

  <Card title="Anti Everyone" icon="bullhorn">
    Deletes messages that ping @everyone or @here. Default punishment is delete+strip
  </Card>

  <Card title="Message Lines" icon="align-left">
    Blocks messages exceeding a configured number of line breaks or total character length
  </Card>
</CardGroup>

### Discord Native Modules

These create and manage Discord AutoMod rules directly. They consume Discord's native rule slots and are enforced by Discord's infrastructure.

<CardGroup cols={2}>
  <Card title="Word Filter" icon="filter">
    Custom keyword list enforced by Discord's native AutoMod. Syncs in real time via `automod word`. Supports bulk-adding words with comma separation
  </Card>

  <Card title="Invite Links" icon="ticket">
    Native keyword rule blocking `discord.gg`, `discord.com/invite`, `dsc.gg`, and `invite.gg` links
  </Card>

  <Card title="Slurs / Hate Speech" icon="ban">
    Native keyword rule blocking a predefined list of slurs and hate speech
  </Card>
</CardGroup>

***

## Punishments

| Punishment | Bot-Side            | Native                                  |
| ---------- | ------------------- | --------------------------------------- |
| `delete`   | ✅ Message deleted   | ✅ Always applies (native always blocks) |
| `mute`     | ✅ Timeout applied   | ✅ Timeout applied                       |
| `kick`     | ✅ User kicked       | ✅ User kicked                           |
| `ban`      | ✅ User banned       | ✅ User banned                           |
| `strip`    | ✅ All roles removed | ❌ Not supported                         |

Bot-side modules support combining multiple punishments with `+` (e.g. `delete+mute`).

<Note>
  Native rules always block the triggering message. The punishment you configure is applied **in addition** to the block — you cannot configure a native rule to only punish without blocking.
</Note>

***

## Threshold Configuration

The following bot-side modules support threshold configuration:

| Module            | Threshold Meaning                               | Has Interval |
| ----------------- | ----------------------------------------------- | ------------ |
| **Spam**          | Messages sent within the interval               | ✅ Yes        |
| **Caps**          | Percentage of uppercase characters              | ❌ No         |
| **Emoji**         | Number of emojis in a message                   | ❌ No         |
| **Duplicate**     | Number of identical consecutive messages        | ❌ No         |
| **Mentions**      | Number of user/role mentions in a message       | ❌ No         |
| **Message Lines** | Line count and character count (two thresholds) | ❌ No         |

***

## Exemptions

Any role or channel can be exempted from any module — both bot-side and native. Exemptions for native modules are synced directly to the Discord AutoMod rule in real time.

```
,automod <module> exempt @Role
,automod <module> exempt #channel
,automod <module> exempt remove @Role
,automod exempt list
```

<Tip>
  Use `automod exempt list` to get a full overview of all exemptions across every module in one place.
</Tip>

***

## Control Panel Interface

Running `,automod` opens an interactive control panel built with Discord Components V2. The interface includes:

* **Real-time status display** showing all bot-side and native modules with their enabled state, thresholds, and punishments
* **Individual toggle buttons** for every module
* **Global controls:**
  * Enable Automod
  * Disable Automod
  * Set Log Channel
  * Set Punishment (applies to all bot-side modules at once)

<Note>
  Only the user who ran the command can interact with the control panel. The panel becomes inactive after 2 minutes but remains visible.
</Note>

***

## Logging Integration

Every Automod action is logged to your configured log channel, including the module that triggered it, the offending message content, the user, and the punishment applied.

<Info>
  Set your log channel with `,automod setlog #channel`. Without a log channel configured, actions are still enforced but not recorded.
</Info>

***

## Best Practices

* Enable **Spam Detection** and **Duplicate Messages** first — these catch the most common low-effort disruption.
* Use **Link Filter** in channels where you don't want self-promotion, combined with a channel exemption for a dedicated `#links` channel. Use the whitelist to allow trusted domains like YouTube or Twitch without disabling the filter.
* Use **Anti Everyone** to prevent permission-less users from abusing mention-all pings, especially in large servers.
* Use **Message Lines** to curb wall-of-text spam without blocking long messages outright — tune the character threshold to match your community's norms.
* Set punishments to `delete` for minor violations (caps, emoji) and `mute` for more disruptive ones (spam, mentions).
* Exempt your moderation roles from all modules so staff actions aren't caught by the filter.
* Use `automod word` for server-specific terms. For general slurs, use `automod slurs` instead to avoid consuming extra keyword rule slots.
* Regularly audit exemptions with `,automod exempt list` to ensure no unintended bypasses exist.

<Warning>
  Native modules consume Discord's 6-rule keyword slot limit. Plan your native rule usage carefully — Word Filter, Invite Links, and Slurs each use one slot.
</Warning>
