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

# Moderation overview

> What's in the moderation toolkit and how the pieces fit together.

Around 230 commands, but they break down into six areas that don't overlap much.

<CardGroup cols={2}>
  <Card title="Punishments" icon="hammer" href="/moderation/punishments">
    Ban, kick, mute, jail, timeout — and every temporary variant.
  </Card>

  <Card title="Warnings" icon="triangle-exclamation" href="/moderation/warnings">
    Warn members and escalate automatically at set counts.
  </Card>

  <Card title="Cases & history" icon="folder-open" href="/moderation/cases">
    Every action is logged with an editable reason and a case number.
  </Card>

  <Card title="Purging" icon="broom" href="/moderation/purge">
    Delete messages by author, content, type or position — 30+ filters.
  </Card>

  <Card title="Channels" icon="hashtag" href="/moderation/channels">
    Lockdowns, slowmode, hiding, nuking, threads.
  </Card>

  <Card title="Roles" icon="user-tag" href="/moderation/roles">
    Mass assignment, temp roles, role links, restoring on rejoin.
  </Card>
</CardGroup>

## Before you start

Two things need setting up once, or half the commands won't work.

<Steps>
  <Step title="Move mira's role up">
    Discord will not let a bot moderate anyone whose highest role sits above the bot's own. Drag mira near the top of the role list — above your staff roles, below nothing that matters.
  </Step>

  <Step title="Create the mute and jail roles">
    ```javascript theme={null}
    !setup
    ```

    Explains what `mute`, `jail`, `imute` and `rmute` need, and creates the missing roles and channel overwrites. Requires **Manage Roles** and **Manage Channels**.

    If you add channels later, re-sync them:

    ```javascript theme={null}
    !mute sync
    !jail sync
    ```
  </Step>
</Steps>

## Things that apply everywhere

<AccordionGroup>
  <Accordion title="Hierarchy is always enforced" icon="layer-group">
    You can't punish someone whose highest role is at or above your own, and neither can mira. This holds even with [fake permissions](/security/fake-permissions) — it's checked against the person running the command, not just the bot.

    The server owner can never be punished by anyone.
  </Accordion>

  <Accordion title="Reasons are optional but tracked" icon="pen">
    Every punishment command takes a trailing reason. If you don't give one, a default is recorded. Reasons are stored on the [case](/moderation/cases) and can be edited afterwards, so a rushed ban can be documented properly later.

    ```javascript theme={null}
    !ban @someone raiding
    !case reason 47 raiding — coordinated with 3 alts
    ```

    Frequently-used reasons can be saved as templates:

    ```javascript theme={null}
    !reason create raid coordinated raid participation
    !ban @someone raid
    ```
  </Accordion>

  <Accordion title="Silent punishments" icon="volume-xmark">
    Adding `-s` or `--silent` to a reason suppresses the DM that would otherwise be sent to the punished member.

    ```javascript theme={null}
    !ban @someone raiding -s
    ```
  </Accordion>

  <Accordion title="Custom responses" icon="comment-dots">
    What mira replies with after a moderation command is fully customisable per command, including the DM the member receives:

    ```javascript theme={null}
    !invoke ban {content: {user.name} is gone. case #{case}}
    !invoke dm ban {title: You were banned from {guild.name}} {description: {reason}}
    ```

    `!invoke variables` lists what you can use. Full details on the [Cases](/moderation/cases#custom-responses) page.
  </Accordion>

  <Accordion title="Multiple targets" icon="users">
    Several commands accept more than one member at a time — `massban`, `voicekick`, `role multiple`. Where they do, separate targets with spaces:

    ```javascript theme={null}
    !massban 111111 222222 333333 --history 1d
    ```
  </Accordion>
</AccordionGroup>

## Quick reference

The commands people reach for most often:

| Command                            | Aliases            | What it does                                 |
| ---------------------------------- | ------------------ | -------------------------------------------- |
| `ban <user> [history] [reason]`    | `boot`             | Ban, deleting up to 7 days of messages       |
| `tempban <member> <time> [reason]` | `tempb`, `tb`      | Ban, auto-unban later                        |
| `hardban <user> [reason]`          | `permaban`, `hb`   | Ban and re-ban on any rejoin attempt         |
| `softban <member> [reason]`        | `softb`            | Ban then unban — a kick that clears messages |
| `kick <member> [reason]`           | —                  | Remove from the server                       |
| `timeout <member> <when>`          | `tmo`, `to`        | Discord timeout                              |
| `mute <member> [when]`             | `shutup`           | Mute role, optionally timed                  |
| `jail <member> [when]`             | `prison`           | Remove all channel access                    |
| `warn <member> [reason]`           | —                  | Record a warning                             |
| `purge [user] [amount]`            | `clear`, `rm`, `c` | Delete messages                              |
| `lockdown [channel]`               | `lock`, `l`        | Make a channel read-only                     |
| `role <member> <roles>`            | `r`                | Add or remove roles                          |
| `history <user>`                   | `mod`, `his`       | Every case against a member                  |
| `case <id>`                        | —                  | Look up one case                             |
