# Moderation

URL: https://zerodev.ca/docs/medusa/modules/moderation

> Bans, kicks, timeouts and warnings with numbered cases, automod, warning escalation, staff notes and server logs.



Moderation is the staff toolkit. Every action is saved as a numbered case, automod handles common rule breaks, repeated warnings escalate on their own, and server events are logged.

## Cases

Bans, unbans, kicks, timeouts and warnings each create a case with the moderator, member and reason. Look one up with `/mod case action:view`, change its reason with `edit-reason` or remove it with `delete`. The **Moderation Cases** dashboard page lists and searches every case.

With **Send DMs to Users** on, the member gets a DM saying what happened and why. **Anonymous Moderator in DMs** leaves the moderator's name out.

## Automod

Automod checks each message and, when one breaks a rule, deletes it and warns the member. Members with Administrator or Manage Server, **Bypass Roles** and **Ignored Channels** are skipped.

| Rule                     | Default | What it catches                                  |
| ------------------------ | ------- | ------------------------------------------------ |
| Anti Discord Invites     | On      | Discord invite links.                            |
| Anti External Links      | Off     | Any web link.                                    |
| Anti Excessive Caps      | Off     | Messages that are at least 70% capital letters.  |
| Anti Message Spam        | On      | Five or more messages within four seconds.       |
| Maximum Allowed Mentions | 5       | Messages that mention this many users and roles. |
| Blacklisted Words        | None    | Any word or phrase on your list.                 |

## Warning Escalation

When a member's active warnings reach a count under **Consequence Escalations**, Medusa applies that action. The defaults are:

| Warnings | Action         |
| -------- | -------------- |
| 3        | 1 hour timeout |
| 5        | Kick           |
| 7        | Permanent ban  |

Each escalation has a **Warning Count**, an **Action** (timeout, kick or ban) and a &#x2A;*Duration (ms)** for timeouts and temporary bans.

## Settings

**Moderation Settings**

| Setting                      | Default | What it does                                                          |
| ---------------------------- | ------- | --------------------------------------------------------------------- |
| Send DMs to Users            | On      | DMs members about actions taken on them.                              |
| Default Ban Message Deletion | 1       | Days of messages a ban deletes when none is given.                    |
| Anonymous Moderator in DMs   | Off     | Hides the moderator's name in DMs.                                    |
| Jail Quarantine Role         | None    | Role assigned to jailed members while their previous roles are saved. |
| Jail Channel                 | None    | Channel where jail notices are posted.                                |

**Auto Moderation Rules**: the rules above, plus **Bypass Roles** and **Ignored Channels**.

**Warning Consequences**: the escalation list.

## Commands

| Command                                                 | What it does                                                                                                                                   |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `/mod ban <user> [reason] [duration] [delete_messages]` | Ban a member. `duration` is in days, `0` or empty is permanent. `delete_messages` is 0 to 7 days.                                              |
| `/mod unban <user> [reason]`                            | Unban a user.                                                                                                                                  |
| `/mod kick <user> [reason]`                             | Kick a member.                                                                                                                                 |
| `/mod mute <user> <duration> [reason]`                  | Time a member out for a number of minutes.                                                                                                     |
| `/mod unmute <user> [reason]`                           | Remove a timeout.                                                                                                                              |
| `/mod warn <user> [reason] [points]`                    | Warn a member.                                                                                                                                 |
| `/mod unwarn <id> [reason]`                             | Remove a warning.                                                                                                                              |
| `/mod warnings <user>`                                  | List a member's warnings.                                                                                                                      |
| `/mod case <action> <case_id> [reason]`                 | View, edit the reason of, or delete a case.                                                                                                    |
| `/mod cases <user>`                                     | List a member's cases.                                                                                                                         |
| `/mod purge <amount> [user]`                            | Delete up to 100 recent messages, optionally only from one member.                                                                             |
| `/mod lock [channel] [reason]`                          | Stop everyone from sending messages in a channel.                                                                                              |
| `/mod unlock [channel]`                                 | Let everyone send messages again.                                                                                                              |
| `/mod slowmode <seconds> [channel]`                     | Set slowmode. `0` turns it off.                                                                                                                |
| `/jail <user> [duration] [reason]`                      | Strip a member's removable roles, assign the Jail Quarantine Role and optionally release them after `duration`. Also available as `/mod jail`. |
| `/unjail <user> [reason]`                               | Remove the Jail Quarantine Role and restore the member's saved roles. Also available as `/mod unjail`.                                         |
| `/note add <user> <text>`                               | Add a private staff note to a member.                                                                                                          |
| `/note list <user>`                                     | List a member's notes.                                                                                                                         |
| `/note remove <id>`                                     | Remove a note.                                                                                                                                 |
| `/role add <user> <role> [duration]`                    | Give a role. A duration like `30m`, `12h` or `7d` removes it later.                                                                            |
| `/role remove <user> <role>`                            | Remove a role.                                                                                                                                 |
| `/role list [user]`                                     | List active temporary roles.                                                                                                                   |
| `/temprole add <user> <role> <duration>`                | Give a temporary role for a duration like `30m`, `12h` or `7d`.                                                                                |
| `/temprole remove <user> <role>`                        | Remove a temporary role early.                                                                                                                 |
| `/temprole list [user]`                                 | List active temporary roles.                                                                                                                   |
| `/nick <user> [nickname]`                               | Change a nickname. Leave it empty to reset it.                                                                                                 |

Right-click a member and open **Apps** for **Ban Member**, **Kick Member**, **Timeout Member** and **Warn Member**. Each opens a form for the reason.

All of these belong to the Moderator rank by default. `/leaderboard` has a **Moderator Actions** board.

## Logs

Moderation adds these categories to the **Logging** page. Each event can be turned on or off and sent to its own channel.

| Log                       | What it records                                                                              |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| Moderation Events         | Bans, unbans, kicks, timeouts, warnings, purges, locks, automod, notes, `/role` and `/nick`. |
| Message Events            | Deleted, edited and bulk deleted messages.                                                   |
| Member Events             | Joins, leaves, role changes, nickname changes and boosts.                                    |
| Channel & Category Events | Channels, categories and threads created, changed or deleted.                                |
| Role Events               | Roles created, changed or deleted, and permission changes.                                   |
| Server & Asset Events     | Server changes, invites, emojis, stickers and webhooks.                                      |
| Voice Events              | Joins, leaves, moves, and server mutes and deafens.                                          |
