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

# Moderation

> Sanctions, channel cleanup and case files: every moderation action is logged as a case you can look up.

Every sanction you apply with Lucie creates a **numbered case** in the server's records. You can then view its details with `!case`, fix its reason with `!reason` and review any user's history with `!modlogs`.

<Note>
  The permissions listed on each command can also be covered by an **authorized moderation role** on the server. Lucie also respects the role hierarchy: you can't sanction someone with a role equal to or higher than yours.
</Note>

<Columns cols={3}>
  <Card title="Sanctions" icon="gavel">
    `warn`, `unwarn`, `mute`, `unmute`, `kick`, `ban`, `softban`, `unban`
  </Card>

  <Card title="Cleanup & channel" icon="brush">
    `purge`, `lock`, `unlock`, `slowmode`
  </Card>

  <Card title="Case files" icon="folder-open">
    `case`, `reason`, `modlogs`, `modstats`
  </Card>
</Columns>

## !warn

Warns a user and logs the <Tooltip tip="A numbered record of a sanction — who issued it, why, and when — that you can look up later.">case</Tooltip> in their record. The response shows how many active warnings they have accumulated.

**Usage:** `!warn <@user> [reason]`

**Aliases:** `advertir`, `aviso`

**Permissions:** Moderate Members

<Tip>
  If the server has automatic escalation configured, when warnings pile up Lucie applies the corresponding sanction on her own and logs it as a separate case.
</Tip>

**Examples**

```text theme={"dark"}
!warn @usuario spam en el chat
!warn 123456789012345678 flood
```

## !unwarn

Removes a warning by its case number (you can see it in `!modlogs @usuario`). It only works on warning-type cases that are still active.

**Usage:** `!unwarn <case> [reason]`

**Aliases:** `delwarn`, `quitarwarn`

**Permissions:** Moderate Members

<Note>
  `!unwarn` **deletes** the warning from the record (it isn't kept as voided) and doesn't create a case of its own. If you'd rather keep it as voided for auditing, void the case from the [web dashboard](https://lucie.elxy.dev).
</Note>

**Examples**

```text theme={"dark"}
!unwarn 12
!unwarn 12 se disculpó
```

## !mute

Temporarily times out a user (Discord <Tooltip tip="Discord's native temporary silence: they can't type or speak until it expires.">timeout</Tooltip>): they won't be able to write or speak while it lasts.

**Usage:** `!mute <@user> [duration] [reason]`

**Aliases:** `timeout`, `aislar`, `silenciar`

**Permissions:** Moderate Members (Lucie also needs **Moderate Members**)

The duration is written as `45s`, `10m`, `1h`, `7d`… with a maximum of **28d** (Discord's limit). If you don't specify a duration, **1h** is applied.

**Examples**

```text theme={"dark"}
!mute @usuario 1h spam
!mute @usuario 7d tóxico en voz
```

## !unmute

Removes a user's timeout. If they don't have an active timeout, Lucie will tell you.

**Usage:** `!unmute <@user> [reason]`

**Aliases:** `untimeout`, `desaislar`

**Permissions:** Moderate Members

**Examples**

```text theme={"dark"}
!unmute @usuario
!unmute @usuario apeló correctamente
```

## !kick

Kicks a user from the server. They can come back if they have an invite.

**Usage:** `!kick <@user> [reason]`

**Aliases:** `expulsar`

**Permissions:** Kick Members (Lucie also needs **Kick Members**)

**Examples**

```text theme={"dark"}
!kick @usuario spam de invitaciones
```

## !ban

Bans a user, optionally temporarily. It accepts the ID even if the user is no longer on the server.

**Usage:** `!ban <@user|ID> [duration] [reason]`

**Aliases:** `banear`

**Permissions:** Ban Members (Lucie also needs **Ban Members**)

If you add a duration (`45s`, `10m`, `1h`, `7d`, `2w`…) the ban is temporary: Lucie unbans on her own when it expires.

<Note>
  With the temporary `/ban` slash command, the user receives an invite back when the ban expires. With the prefix (`!ban 7d`), the ban simply expires without an invite.
</Note>

**Examples**

```text theme={"dark"}
!ban @usuario raid
!ban @usuario 7d spam reincidente
!ban 123456789012345678 alt de baneado
```

## !softban

Bans and instantly unbans: useful for kicking a user while deleting their messages from the last day.

**Usage:** `!softban <@user> [reason]`

**Permissions:** Ban Members (Lucie also needs **Ban Members**)

**Examples**

```text theme={"dark"}
!softban @usuario spam masivo
```

## !unban

Unbans a user by their ID.

**Usage:** `!unban <ID> [reason]`

**Aliases:** `desbanear`

**Permissions:** Ban Members (Lucie also needs **Ban Members**)

**Examples**

```text theme={"dark"}
!unban 123456789012345678 apeló y fue aceptado
```

## !purge

Deletes recent messages from the channel, optionally only those from one user. These channel tools don't create cases.

**Usage:** `!purge [amount] [@user]` · `!purge -p [amount]`

**Aliases:** `prune`

**Permissions:** Manage Messages (Lucie also needs **Manage Messages**) — **except with `-p`, which needs no permissions**

The amount ranges from 1 to 100; if you don't specify it, 100 messages are deleted. The confirmation deletes itself after a few seconds.

### Personal purge (`-p`)

With `-p` you delete **your own messages** without needing moderation permissions: your messages are yours. From 1 to 25 (25 if you don't specify an amount), and **only in the channel where you run the command** — it never touches your messages in other channels or anyone else's, even if you mention someone: with `-p` the target is always you.

<Note>
  Purged messages never come back with `!snipe`, neither from a moderation purge nor from a personal one.
</Note>

<Warning>
  Messages older than 14 days can't be <Tooltip tip="Deleting many messages at once; Discord only allows it for messages under 14 days old.">bulk-deleted</Tooltip> (Discord's limit).
</Warning>

**Examples**

```text theme={"dark"}
!purge
!purge 20
!purge 50 @usuario
!purge -p
!purge -p 10
```

## !lock

Locks the current channel: only staff can write.

**Usage:** `!lock [reason]`

**Aliases:** `bloquear`

**Permissions:** Manage Channels (Lucie needs **Manage Channels** and **Manage Roles** in the channel)

**Examples**

```text theme={"dark"}
!lock
!lock raid en curso
```

## !unlock

Unlocks the channel: everyone can write again.

**Usage:** `!unlock [reason]`

**Aliases:** `desbloquear`

**Permissions:** Manage Channels (Lucie needs **Manage Channels** and **Manage Roles** in the channel)

**Examples**

```text theme={"dark"}
!unlock
!unlock fin del raid
```

## !slowmode

Sets the channel's slowmode: the minimum time between each user's messages.

**Usage:** `!slowmode <seconds|5m|1h|off>`

**Aliases:** `slow`

**Permissions:** Manage Channels (Lucie also needs **Manage Channels**)

It accepts seconds (`10`), durations (`5m`, `1h`) or `off`/`0` to disable it. Maximum: **6h**.

**Examples**

```text theme={"dark"}
!slowmode 10
!slowmode 5m
!slowmode off
```

## !case

Shows the details of a moderation case: sanction type, user, moderator, reason, duration, date and status.

**Usage:** `!case <number>`

**Aliases:** `caso`

**Permissions:** Moderate Members

**Examples**

```text theme={"dark"}
!case 12
```

## !reason

Edits the reason of an already logged case. Handy when you sanctioned in a hurry and want to leave the record well documented.

**Usage:** `!reason <case> <new reason>`

**Aliases:** `razon`

**Permissions:** Moderate Members

**Examples**

```text theme={"dark"}
!reason 12 spam reincidente en varios canales
```

## !modlogs

Shows a user's moderation record: their 10 most recent cases, with counters for active cases, voided cases and active warnings. By default you see **active** cases, with buttons to switch to **Voided** or **All**.

**Usage:** `!modlogs [@user]`

**Aliases:** `expediente`, `warns`, `sanciones`

**Permissions:** Moderate Members

<Tip>
  Without an argument, `!modlogs` shows **your own record**: anyone can look it up if the server enables the public record on the [web dashboard](https://lucie.elxy.dev). Viewing other people's records still requires moderation permissions.
</Tip>

**Examples**

```text theme={"dark"}
!modlogs @usuario
!modlogs 123456789012345678
```

## !modstats

Ranking of sanctions applied by each moderator on the server, with the total number of logged cases.

**Usage:** `!modstats`

**Aliases:** `modranking`

**Permissions:** Moderate Members

**Examples**

```text theme={"dark"}
!modstats
```
