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

# Automod

> Automatically moderate your server with filters, keywords, and strike systems.

## Overview

greed's Automod system allows you to automatically filter out unwanted content and manage user behavior through a strike system. It provides a multi-layered approach to server security including content filters, custom regex matching, and a persistent violation tracking system.

<Tip>
  Most advanced automod features, including the strike system and regex builder, are part of greed premium.
</Tip>

## Filters

Filters are the primary mechanism for detecting and punishing specific types of content in real-time.

### Available Filters

<AccordionGroup>
  <Accordion title="Spam">
    Detects messages sent too quickly by a single user.

    * **Threshold:** Number of messages allowed within a 10-second window.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter spam (status) [target] [threshold=5]
            ```

            ```javascript Example theme={null}
            ,filter spam on #general threshold=5
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Caps">
    Detects messages containing excessive capital letters (only for messages 10+ characters).

    * **Threshold:** Maximum percentage (%) of uppercase characters allowed.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter caps (status) [target] [threshold=70]
            ```

            ```javascript Example theme={null}
            ,filter caps on all threshold=70
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Emojis">
    Detects messages containing too many emojis.

    * **Threshold:** Maximum number of emojis allowed per message.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter emoji (target) (status) [threshold=10]
            ```

            ```javascript Example theme={null}
            ,filter emoji #general on threshold=10
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Mass Mention">
    Detects messages with a high number of user or role mentions.

    * **Threshold:** Maximum total mentions allowed per message.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter massmention (status) [target] [threshold=5]
            ```

            ```javascript Example theme={null}
            ,filter massmention on #general threshold=5
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Spoilers">
    Filters out excessive use of spoiler tags or spoiler attachments.

    * **Threshold:** Maximum number of spoilers allowed per message.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter spoilers (target) (status) [threshold=5]
            ```

            ```javascript Example theme={null}
            ,filter spoilers all on threshold=5
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Images">
    Filters messages that contain too many image attachments.

    * **Threshold:** Maximum number of images allowed per message.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter images (status) [target] [threshold=3]
            ```

            ```javascript Example theme={null}
            ,filter images on #general 6
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Invites">
    Automatically blocks Discord invite links to other servers.

    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter invites (status) [target]
            ```

            ```javascript Example theme={null}
            ,filter invites on all
            ```
          </CodeGroup>
  </Accordion>

  <Accordion title="Links">
    Filters out messages containing URLs or specific types of links.

    * **Threshold:** Maximum number of links allowed per message.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter links (status) [target]
            ```

            ```javascript Example theme={null}
            ,filter links on #general
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Repetition">
    Detects repetitive messages or high similarity between consecutive messages.

    * **Threshold:** Number of similar messages before triggering.
    * **Similarity:** Percentage (%) match required to be considered "repeated".
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter repetition (target) (status) [threshold=5]
            ```

            ```javascript Example theme={null}
            ,filter repetition all on threshold=5
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="Wall of Text">
    Detects messages that are too long or have too many newlines.

    * **Max Newlines:** Maximum newline characters allowed.
    * **Max Length:** Maximum total characters allowed.
    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter walloftext (target) (status) [threshold=1000]
            ```

            ```javascript Example theme={null}
            ,filter walloftext all on threshold=1000
            ```
          </CodeGroup>

    <Tip>
      This filter is part of greed premium.
    </Tip>
  </Accordion>

  <Accordion title="filtering">
    Matches messages against your custom keyword blacklist.

    * **Usage:**

          <CodeGroup>
            ```javascript Command theme={null}
            ,filter add (word)
            ```

            ```javascript Example theme={null}
            ,filter add nitro
            ```
          </CodeGroup>
  </Accordion>
</AccordionGroup>

## Strike System

<Tip>
  The strike system is a greed premium feature.
</Tip>

The strike system tracks repeated violations and applies escalating punishments automatically as users accumulate strikes.

### Strike Management

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes toggle (enabled)
  ```

  ```javascript Example theme={null}
  ,filter strikes toggle true
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes set (level) (strikes) (punishment)
  ```

  ```javascript Example theme={null}
  ,filter strikes set 1 4 ban
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes decay (hours)
  ```

  ```javascript Example theme={null}
  ,filter strikes decay 24
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes cap (maximum)
  ```

  ```javascript Example theme={null}
  ,filter strikes cap 10
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes view (member)
  ```

  ```javascript Example theme={null}
  ,filter strikes view @fe3murs
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes reset (member)
  ```

  ```javascript Example theme={null}
  ,filter strikes reset @fe3murs
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter strikes settings
  ```

  ```javascript Example theme={null}
  ,filter strikes settings
  ```
</CodeGroup>

## Custom Regex Patterns

<Tip>
  Regex rules are a greed premium feature.
</Tip>

For advanced users, greed allows you to create custom Regular Expression patterns to catch complex varieties of unwanted content.

### Regex Builder Utility

greed includes an interactive **Regex Builder** to help you create patterns without needing to learn complex regex syntax.

<CodeGroup>
  ```javascript Command theme={null}
  ,filter regex
  ```

  ```javascript Example theme={null}
  ,filter regex
  ```
</CodeGroup>

### Regex Commands

Once you have a pattern, use these commands to manage your custom filters:

<CodeGroup>
  ```javascript Command theme={null}
  ,filter regex add (name) (pattern)
  ```

  ```javascript Example theme={null}
  ,filter regex add profanity ^badword$
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter regex remove (name)
  ```

  ```javascript Example theme={null}
  ,filter regex remove profanity
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter regex list
  ```

  ```javascript Example theme={null}
  ,filter regex list
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter regex test (name) (text)
  ```

  ```javascript Example theme={null}
  ,filter regex test profanity wsp world
  ```
</CodeGroup>

## Filtering and Blacklist

Block specific words or domains from your server.

### Blacklist (Domains)

<CodeGroup>
  ```javascript Command theme={null}
  ,filter blacklist add (domain)
  ```

  ```javascript Example theme={null}
  ,filter blacklist add example.com
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter blacklist remove example.com
  ```

  ```javascript Example theme={null}
  ,automod blacklist remove discord.gg/scam
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter blacklist list
  ```

  ```javascript Example theme={null}
  ,filter blacklist list
  ```
</CodeGroup>

### filtering List

<CodeGroup>
  ```javascript Command theme={null}
  ,filter add (word)
  ```

  ```javascript Example theme={null}
  ,filter add free nitro
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter remove (word)
  ```

  ```javascript Example theme={null}
  ,filter remove free nitro
  ```
</CodeGroup>

<CodeGroup>
  ```javascript Command theme={null}
  ,filter list
  ```

  ```javascript Example theme={null}
  ,filter list
  ```
</CodeGroup>

## Whitelisting

Exempt specific members, roles, from automod checks.

<CodeGroup>
  ```javascript Command theme={null}
  ,filter whitelist (word)
  ,filter exempt (role)
  ```

  ```javascript Example theme={null}
  ,filter whitelist goodword
  ,filter exempt @moderator
  ```
</CodeGroup>

to remove a whitelisted word simply , run the same command `,filter whitelist (word)` .

<CodeGroup>
  ```javascript Command theme={null}
  ,filter whitelist goodword
  ```

  ```javascript Example theme={null}
  ,filter whitelist goodword
  ```
</CodeGroup>
