# Moderation

Use /ban, /kick and /mute on Discord with a reason and proof, log every case and undo punishments from the FiveDash panel.

Source: https://fivedash.fivex.gg/docs/en/discord/moderation

Moderation gives your city's staff the **/ban**, **/kick** and **/mute** commands on Discord, with a required reason, up to 3 proof files in the command itself and a log of every case in the panel. Who punishes, who can punish and who is never punished are set in **Discord → Moderation**. It's for owners and staff who want punishments that are fair, traceable and easy to review.

## Before you start

* The **Discord** module must be on the organization's plan. Moderation comes with every plan (Plus, Pro and Ultra).
* The city's bot must be connected to the Discord server. See [Bot](https://fivedash.fivex.gg/docs/en/discord/bot).
* The bot's role needs these permissions: **Ban Members**, **Kick Members**, **Timeout Members**, **Send Messages** and **Embed Links**. If one is missing, the page shows a warning listing them.
* The bot's role must be **above** the highest role of whoever it punishes (Server Settings → Roles).

Access level in the panel (**Moderation** area):

| Level         | What it allows                           |
| ------------- | ---------------------------------------- |
| **View**      | Punishment log                           |
| **Manage**    | Unban, lift timeouts and attach evidence |
| **Configure** | Commands, roles and messages             |

## Turn on the commands

### Open Moderation

In the panel, go to **Discord → Moderation** and open the **Settings** tab.

### Pick the commands

Under **Commands**, turn on the ones the staff will use: **Ban**, **Kick** and **Mute**. Each has a **Turn on /ban**, **Turn on /kick** or **Turn on /mute** switch. Unbanning (**/unban**) comes with **/ban**, and ending a mute (**/unmute**) comes with **/mute**.

### Set who can use them

Under **Who can use it**, pick the roles that can use each command. With no roles picked, it shows **Administrators only**: only members with Administrator in the server can use it.

### Protect who can't be punished

In the **Protection** group, pick **Protected roles** and **Protected members**. Nobody can punish them with any command.

### Pick where to log

Under **Discord log → Where to log**, pick **Panel only**, **One channel** or **One per command** and the channels.

### Save

Click **Save** on the **You have unsaved changes** bar. If Discord responds, you see **Commands updated on Discord** with the list of available commands.

> Commands are only registered in the server while they're on. If you see **Saved, but the commands didn't change on Discord**, open the bot's overview and check again.

## The commands on Discord

Command replies are private: only whoever used the command sees them. Command and option names always stay as below, whatever the city's language.

| Command   | Options                                                                                                      | What it does                                                        |
| --------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| `/ban`    | `membro` (required, an ID works too), `motivo` (required), `prova`, `prova_2`, `prova_3`, `apagar_mensagens` | Bans the member. They stay out until someone unbans them.           |
| `/unban`  | `usuario` (required, paste the ID), `motivo` (optional)                                                      | Lifts the ban. Becomes an **Unban** case.                           |
| `/kick`   | `membro` (required), `motivo` (required), `prova`, `prova_2`, `prova_3`                                      | Kicks the member. They can come back through the invite.            |
| `/mute`   | `membro` (required), `duracao` (required), `motivo` (required), `prova`, `prova_2`, `prova_3`                | Uses Discord's timeout: the member can't talk, react or join calls. |
| `/unmute` | `membro` (required), `motivo` (optional)                                                                     | Ends the member's timeout. Becomes an **Unmute** case.              |

`motivo` (reason) takes up to 500 characters. See every bot command in [Commands](https://fivedash.fivex.gg/docs/en/discord/commands).

### /mute durations

`duracao` takes: 1 minute, 5 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours, 12 hours, 1 day, 3 days, 1 week, 2 weeks and 28 days (Discord's maximum).

### Deleting messages with /ban

`apagar_mensagens` is optional. If unset, nothing is deleted.

| Choice           | Deletes the member's messages            |
| ---------------- | ---------------------------------------- |
| **Don't delete** | None (default)                           |
| **Last hour**    | From the last hour                       |
| **Last 6 hours** | From the last 6 hours                    |
| **Last day**     | From the last 24 hours                   |
| **Last 3 days**  | From the last 3 days                     |
| **Last 7 days**  | From the last 7 days (Discord's maximum) |

### Who can be punished

The bot refuses the command when:

* someone tries to punish themselves, the bot or the server owner;
* the target has a protected role or is in the protected members;
* the target's highest role is equal to or above the highest role of whoever used the command (a Support can't punish a Moderator);
* the bot's role is below the target's highest role;
* the target of a **/mute** is an administrator (Discord doesn't allow timing out administrators).

> If [Protection](https://fivedash.fivex.gg/docs/en/discord/protection) has **Staff limits** on, FiveDash's **/ban** and **/kick** count toward the bans and kicks limits. A moderator who goes over the limit is stopped.

## Settings

### Commands

| Field                                | What it does                                                                                                       | Default                        |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
| **Turn on /ban**                     | Registers **/ban** and **/unban** in the server.                                                                   | On                             |
| **Turn on /kick**                    | Registers **/kick** in the server.                                                                                 | On                             |
| **Turn on /mute**                    | Registers **/mute** and **/unmute** in the server.                                                                 | On                             |
| **Who can use it** (on each command) | The roles that can use the command. Members with one of these roles (or Administrator) can use it. Up to 25 roles. | None (**Administrators only**) |

### Protection

| Field                 | What it does                                                                      | Default |
| --------------------- | --------------------------------------------------------------------------------- | ------- |
| **Protected roles**   | Members with one of these roles can't be punished by any command. Up to 25 roles. | None    |
| **Protected members** | Specific people nobody can punish, whatever their role. Up to 50 members.         | None    |

### Discord log

| **Where to log** option | What it does                                                                                                                                        |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Panel only**          | Nothing goes to Discord. Cases stay in the **Log** tab only. Default.                                                                               |
| **One channel**         | Every command in the same channel. Asks for the **Log channel**.                                                                                    |
| **One per command**     | Each command in its own channel. Asks for the **Log channel for /ban**, **/kick** and **/mute** (each channel also gets its command's revocations). |

Every punishment and every revocation becomes a message in the chosen channel.

### Private message

| Field                       | What it does                                                                                                       | Default       |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------- |
| **Notify the member by DM** | They get the reason in private. For bans and kicks the DM goes first, since the bot can't reach them afterwards.   | On            |
| **Show who punished**       | Puts the moderator's name in the DM. Off, the team stays anonymous.                                                | Off           |
| **Messages**                | Opens **Customize messages**: each command's DM text and image.                                                    | Default texts |
| **Embed**                   | Opens **Customize embed**: each action's color, the member's photo in the log and the server at the top of the DM. | See below     |

### Customize messages

One tab per command (**/ban DM**, **/kick DM**, **/mute DM**). Each text takes up to 1,500 characters and an optional **Image**, wide (2:1), at the end of the DM: PNG, JPG, WebP or GIF up to 1 MB.

Variables the texts accept:

| Variable     | What it shows                          |
| ------------ | -------------------------------------- |
| `{membro}`   | Mentions the punished member (@Player) |
| `{nome}`     | The punished member's name             |
| `{servidor}` | The Discord server's name              |
| `{motivo}`   | The reason written in the command      |
| `{duracao}`  | How long the mute lasts                |
| `{caso}`     | The case number (#012)                 |

Default **/ban** DM text (English city):

```text
{{error}} You were **banned** from **{servidor}**.
**Reason:** {motivo}
```

> With **Notify the member by DM** on, none of the three messages can be empty. The panel won't save and shows, for example, **Write the DM for /ban.**

### Customize embed

| Field                           | What it does                                                         | Default   |
| ------------------------------- | -------------------------------------------------------------------- | --------- |
| **Ban** **Color**               | The log, the DM and the /ban reply.                                  | `#ED4245` |
| **Kick** **Color**              | The log, the DM and the /kick reply.                                 | `#F0B232` |
| **Mute** **Color**              | The log, the DM and the /mute reply.                                 | `#9B84EE` |
| **Revocations** **Color**       | The /unban and /unmute log (and punishments revoked from the panel). | `#57F287` |
| **Member's photo in the log**   | The punished member's photo in the corner of the message.            | On        |
| **Server at the top of the DM** | The server's name and icon above the private message.                | On        |

The preview next to it shows the result in three views: **Log**, **DM** and **Reply**.

## The punishment log

The **Log** tab lists every **/ban**, **/kick** and **/mute** used on Discord, with the reason and the proof.

* **Tiles at the top**: **Bans** (how many in effect), **Mutes** (who's muted right now), **Kicks** and **Revocations**. Click a tile to filter.
* **Search**: by member, moderator, reason, ID or case number (`#12` or `12`).
* **Columns**: **Case**, **Moderator**, **Status** and **When**.
* **Per page**: 10, 20 or 50 rows.

Case statuses:

| Status        | When it shows                                              |
| ------------- | ---------------------------------------------------------- |
| **In effect** | A ban still standing, or a mute that hasn't ended.         |
| **Ended**     | A mute that ran out.                                       |
| **Revoked**   | A ban or mute undone by /unban, /unmute or from the panel. |

Kicks and revocations don't stay "in effect": a kicked member can come back through the invite.

### Open a case

Click a row to open the case. It shows **Moderator**, **When**, **Duration**, **Messages** (deleted or kept), **DM** (delivered or not), **Log**, the **Reason**, the **Proof** and the **Timeline**. Use **Copy ID** to copy the member's ID and **View in log** to open the message on Discord.

## Undo a punishment from the panel

Needs the **Manage** level.

### Open the case

In **Discord → Moderation → Log**, click the ban or mute that is **In effect**.

### Click to revoke

Click **Unban** (ban) or **Unmute** (mute).

### Write a reason, if you want

The **Reason (optional)** goes in the Discord log and the server's audit log. Without one, it says "Revoked from the panel".

### Confirm

Confirm. The revocation becomes a new case: you see **Recorded as case #N**.

## Attach proof

Needs the **Manage** level.

* In the command, staff send up to 3 proof files (`prova`, `prova_2`, `prova_3`). Through the command, the bot keeps images up to 8 MB and videos up to 25 MB; anything bigger has to be attached from the panel.
* In the panel, open the case and use **Attach proof** (or **Add**): drag or pick screenshots and videos. PNG, JPG, WebP or GIF images and MP4, MOV or WebM videos, up to 25 MB each.
* A case holds up to 10 proof files.
* To take one off, use **Remove** next to it.

## FAQ

**The command doesn't show up on Discord. What do I do?**
Check that it's on in **Settings** and save. If the panel says the commands didn't change on Discord, open the bot page and check again.

**The DM didn't reach the member.**
The member may have DMs closed. The case shows **Didn't arrive (DMs closed or off)** on the **DM** row. The punishment still applies.

**Why does the bot say it can't punish someone?**
Either the bot's role is below the member's, the member has a role equal to or above yours, or they're protected. Drag the bot's role up in Server Settings → Roles.

**Can I use moderation without sending anything to Discord?**
Yes. Under **Where to log**, pick **Panel only** and turn off **Notify the member by DM**.

## Next steps

[Protection](https://fivedash.fivex.gg/docs/en/discord/protection)Anti-link, anti-spam, staff limits and anti-raid.
[Summons](https://fivedash.fivex.gg/docs/en/discord/alignment)Summon someone for a talk, with a deadline.
[Commands](https://fivedash.fivex.gg/docs/en/discord/commands)Every bot command and who uses it.
[Team and permissions](https://fivedash.fivex.gg/docs/en/dashboard/team-and-permissions)Give each person the right level.
