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

# Auto-Moderation

> Protect your server with Veronica's comprehensive AI-powered Auto-Moderation suite.

# Auto-Moderation

Veronica's Auto-Moderation system is a next-generation security suite designed to protect your server from spam, toxicity, raids, and malicious content. With **10+ intelligent modules**, **AI-powered filtering**, and **automated escalation**, you can maintain a safe community without constant manual intervention.

<Info>
  All Auto-Moderation commands support both **Slash Commands** and **Prefix Commands**.
</Info>

## Quick Setup

Get started with Auto-Moderation in seconds using the interactive configuration panel.

<Steps>
  <Step title="Open the Panel">
    Launch the Auto-Moderation control center.

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

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

  <Step title="Select a Module">
    Use the dropdown menu to navigate between different protection categories:

    * **Anti-Spam** - Burst message detection
    * **Anti-Link** - URL filtering with whitelisting
    * **Bad Words** - Custom phrase blocking
    * **Mass Mention** - Ping spam protection
    * **Anti-Invite** - Discord invite blocking
    * **Anti-Caps** - Excessive capitalization control
    * **Anti-Emoji** - Emoji spam prevention
    * **Anti-Phishing** - Malicious link detection
    * **Anti-Raid** - Join-rate limiting
    * **AI Filter** - Gemini-powered toxicity detection
  </Step>

  <Step title="Configure Settings">
    Click **Toggle** to enable/disable modules, or **Edit** to customize thresholds, durations, and whitelists via interactive modals.
  </Step>
</Steps>

<Warning>
  **Permission Required:** You must have **Administrator** permissions to access and modify Auto-Moderation settings.
</Warning>

## Module Overview

<CardGroup cols={2}>
  <Card title="Anti-Spam" icon="ban">
    Detects rapid message bursts and automatically mutes or warns offenders. Configure message threshold and time window.
  </Card>

  <Card title="Anti-Link" icon="link-slash">
    Blocks unauthorized URLs while allowing whitelisted domains. Perfect for preventing phishing and scams.
  </Card>

  <Card title="Bad Words Filter" icon="comment-slash">
    Maintains a custom list of prohibited phrases. Messages containing blacklisted words are instantly deleted.
  </Card>

  <Card title="Mass Mention Protection" icon="at">
    Prevents users from tagging excessive members in a single message. Configurable mention limit with auto-ban option.
  </Card>

  <Card title="Anti-Invite" icon="envelope">
    Blocks Discord server invites to prevent raiding and poaching. Option to allow your own server's invite.
  </Card>

  <Card title="Anti-Caps" icon="text-height">
    Deletes messages with excessive capitalization. Set percentage threshold and minimum message length.
  </Card>

  <Card title="Anti-Emoji" icon="face-smile">
    Limits the number of emojis per message to prevent spam and visual clutter.
  </Card>

  <Card title="Anti-Phishing" icon="shield">
    Uses Discord's phishing database to detect and ban users posting malicious links.
  </Card>

  <Card title="Anti-Raid" icon="users-slash">
    Monitors join rates and automatically kicks or bans members during coordinated raids.
  </Card>

  <Card title="AI Filter" icon="brain">
    Leverages **Gemini AI** to detect toxic, offensive, or harmful content in real-time with adjustable sensitivity.
  </Card>
</CardGroup>

## Advanced Features

### Automated Escalation

<Note>
  Veronica tracks user violations across all modules and automatically escalates punishments based on strike count. For example: **3 warns → 1 mute**, **5 warns → 1 kick**, **7 warns → 1 ban**.
</Note>

Configure escalation thresholds in the **Escalation** category:

* **Strike Expiry**: How long strikes remain active (default: 24 hours)
* **Mute Duration**: Default timeout length for escalated mutes
* **Strike Thresholds**: Customize warn/mute/kick/ban limits

### Bypass Management

Exempt trusted users, roles, or channels from Auto-Moderation enforcement:

| Bypass Type           | Description                                |
| :-------------------- | :----------------------------------------- |
| **Whitelisted Users** | Specific user IDs that bypass all filters. |
| **Exempt Roles**      | Roles that are immune to Auto-Mod actions. |
| **Exempt Channels**   | Channels where Auto-Mod is disabled.       |

<Tip>
  Use the **Whitelists** category in the panel to manage all bypass settings in one place.
</Tip>

## Configuration Examples

<CodeGroup>
  <Steps title="Anti-Spam Setup">
    <Step title="Open Panel">
      Run `/automod` in any channel.
    </Step>

    <Step title="Enable Module">
      Select **Anti-Spam** from the dropdown and click **Toggle**.
    </Step>

    <Step title="Configure">
      Click **Edit** and set:

      * Burst Limit: `5` messages
      * Time Window: `5000ms` (5 seconds)
    </Step>

    <Step title="Verify">
      <Check>Anti-Spam is now active and monitoring burst messages.</Check>
    </Step>
  </Steps>

  <Steps title="AI Filter Setup">
    <Step title="Open Panel">
      Run `/automod` in any channel.
    </Step>

    <Step title="Enable AI">
      Select **AI Filter** from the dropdown and click **Toggle**.
    </Step>

    <Step title="Verify">
      <Check>Gemini AI is now scanning messages for toxicity.</Check>
    </Step>
  </Steps>

  <Steps title="Whitelist Setup">
    <Step title="Open Panel">
      Run `/automod` in any channel.
    </Step>

    <Step title="Select Link Filter">
      Choose **Anti-Link** from the dropdown.
    </Step>

    <Step title="Configure Domains">
      Click **Edit** and enter trusted domains: `youtube.com`, `twitter.com`.
    </Step>

    <Step title="Verify">
      <Check>Whitelisted domains will longer be flagged by the filter.</Check>
    </Step>
  </Steps>
</CodeGroup>

## How It Works

```mermaid theme={null}
graph TD
    A[User sends message] --> B{AutoMod Enabled?}
    B -->|No| Z[Message Allowed]
    B -->|Yes| C{Check Exemptions}
    C -->|Exempt| Z
    C -->|Not Exempt| D[Run Module Checks]
    D --> E{Violation Detected?}
    E -->|No| Z
    E -->|Yes| F[Execute Action]
    F --> G{Escalation Enabled?}
    G -->|No| H[Apply Module Action]
    G -->|Yes| I[Increment Strikes]
    I --> J{Strike Threshold Met?}
    J -->|No| H
    J -->|Yes| K[Apply Escalated Punishment]
    K --> L[Log to Channel]
    H --> L
```

<Warning>
  **Important:** Ensure Veronica has the necessary permissions (`Manage Messages`, `Moderate Members`, `Ban Members`) to enforce Auto-Moderation actions.
</Warning>

## Best Practices

<AccordionGroup>
  <Accordion title="Start with Core Modules">
    Enable **Anti-Spam**, **Anti-Invite**, and **Anti-Phishing** first. These provide the most immediate protection against common threats.
  </Accordion>

  <Accordion title="Whitelist Trusted Roles">
    Add your **Moderator** and **Admin** roles to the exempt list to prevent accidental auto-moderation of staff members.
  </Accordion>

  <Accordion title="Test Before Full Deployment">
    Enable modules one at a time in a test channel to fine-tune thresholds before server-wide enforcement.
  </Accordion>

  <Accordion title="Monitor Logs">
    Set a **Log Channel** in the panel to track all Auto-Mod actions and adjust settings based on false positives.
  </Accordion>
</AccordionGroup>
