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

# Moderation

> Advanced moderation commands to keep your community safe.

## Overview

Flare's Moderation module is the backbone of server management. It provides a complete suite of tools for banning, kicking, muting, warning, jailing, and cleaning up messages — all with confirmation prompts, audit logging, and role hierarchy safety checks.

### Why use Flare for Moderation?

* **Confirmation Prompts:** Every destructive action (ban, kick) requires a button click confirmation to prevent accidents.
* **Audit Trail:** All moderation actions are logged to your configured Mod Log channel.
* **Hierarchy Safety:** Flare automatically checks role hierarchy before executing. If a moderator tries to ban someone with a higher role, Flare will refuse.

***

## Requirements

<Warning>
  Flare must have the relevant permissions (`Ban Members`, `Kick Members`, `Moderate Members`, `Manage Messages`, `Manage Roles`) and its role must be above all member roles in the hierarchy.
</Warning>

***

## Key Commands

<Tabs>
  <Tab title="Punishments">
    | Command                            | Description                      | Permission         |
    | ---------------------------------- | -------------------------------- | ------------------ |
    | `/ban <user> [reason]`             | Ban a user from the server       | `Ban Members`      |
    | `/kick <user> [reason]`            | Kick a member                    | `Kick Members`     |
    | `/mute <user> [duration] [reason]` | Timeout a member                 | `Moderate Members` |
    | `/warn <user> [reason]`            | Issue a warning                  | `Manage Messages`  |
    | `/jail <user> [reason]`            | Strip roles and assign jail role | `Manage Roles`     |
    | `/softban <user> [reason]`         | Ban + unban to purge messages    | `Ban Members`      |
  </Tab>

  <Tab title="Reversals">
    | Command                     | Description            | Permission         |
    | --------------------------- | ---------------------- | ------------------ |
    | `/unban <user_id> [reason]` | Unban a user           | `Ban Members`      |
    | `/unmute <user>`            | Remove timeout         | `Moderate Members` |
    | `/unjail <user>`            | Restore saved roles    | `Manage Roles`     |
    | `/unbanall`                 | Unban all banned users | `Administrator`    |
    | `/clearwarns <user>`        | Clear all warnings     | `Manage Guild`     |
  </Tab>

  <Tab title="Channel Management">
    | Command                    | Description                           | Permission        |
    | -------------------------- | ------------------------------------- | ----------------- |
    | `/lock [channel]`          | Prevent members from sending messages | `Manage Channels` |
    | `/unlock [channel]`        | Restore send permissions              | `Manage Channels` |
    | `/hide [channel]`          | Hide a channel from members           | `Manage Channels` |
    | `/unhide [channel]`        | Reveal a hidden channel               | `Manage Channels` |
    | `/nuke`                    | Clone and delete the current channel  | `Manage Channels` |
    | `/slowmode <seconds>`      | Set channel slowmode                  | `Manage Channels` |
    | `/purge <amount> [filter]` | Bulk delete messages                  | `Manage Messages` |
  </Tab>
</Tabs>

***

## The Jail System

Flare has a unique **Jail** system. When you jail a member, Flare strips all their roles, saves them to the database, and assigns a "Jail" role that restricts them to a single jail channel. When unjailed, all roles are restored.

<Steps>
  <Step title="Setup the Jail">
    Run the setup command. Flare will create a jail role and channel automatically.

    ```bash theme={null}
    /jailsetup
    ```
  </Step>

  <Step title="Jail a Member">
    ```bash theme={null}
    /jail @user breaking server rules
    ```
  </Step>

  <Step title="Unjail When Ready">
    ```bash theme={null}
    /unjail @user
    ```
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Flare says 'Cannot moderate this user'">
    The target user has a role equal to or higher than Flare's role. Drag Flare's role above theirs in Server Settings > Roles.
  </Accordion>

  <Accordion title="Warnings aren't showing up">
    Warnings are stored in the database. Use `/warnings @user` to view all active warnings for a member.
  </Accordion>
</AccordionGroup>

## Related Pages

* [Moderation Commands](/commands/moderation)
* [Moderation Logs](/logging/moderation-logs)
