# Warnings

Give warnings with /advertir on Discord, a role per level and, at the limit, remove the member's whitelist or ban them from Discord and the city.

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

Warnings are part of [Moderation](https://fivedash.fivex.gg/docs/en/discord/moderation). Staff use **/advertir** on Discord (or the **Warn** button in the panel) and the member goes up a level. Each level has its own Discord role, and the last level is the limit: there the member loses their whitelist in the city or is banned, whichever you pick. Everything lives in **Discord → Moderation**, and the **Warnings** tab shows who has warnings, at which level and each member's history. It's for teams that want to warn before punishing, with everything on record.

## Before you start

* The **Discord** module must be on the organization's plan. Warnings come with Moderation, on 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).
* Create one Discord role for each warning level. Each level needs a different role.
* The bot's role needs **Manage Roles** and must be **above** the warning roles. The Moderation page's permission warning doesn't check **Manage Roles**: if it's missing, you see the problem in the warning's reply.
* To post warnings in the log channel, the bot needs **Send Messages** and **Embed Links**.
* With the **Ban** punishment, the bot needs **Ban Members** and a role above the member's highest role.
* For a level's action (see [Each level's action](#each-level-s-action)), the bot needs **Timeout Members**, **Kick Members** or **Ban Members**, depending on the action, and a role above the member's highest role.
* With the **Remove whitelist** punishment, the [Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist) must be set up in the panel and the city must be connected to FiveDash on a framework that has a whitelist.

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

| Level         | What it allows                                                           |
| ------------- | ------------------------------------------------------------------------ |
| **View**      | The **Warnings** tab: who has warnings, their level and the history      |
| **Manage**    | **Warn** from the panel and **Remove** warnings                          |
| **Configure** | Turn warnings on, each level's role, the limit and who can use /advertir |

Whoever uses **/advertir** on Discord doesn't need panel access: their Discord role is what counts.

## Turn on warnings

### Open Moderation

In the panel, go to **Discord → Moderation** and open the **Settings** tab. Warnings are in the **Warnings** group.

### Turn them on

Turn on the **Turn on warnings** switch. They start off.

### Pick each level's role

Under **Levels**, pick a role for each warning (**Warning 1**, **Warning 2** and so on). The last level has the **limit** tag. Use **Add level** to add one more (up to 10), or the **X** next to a level to remove it (it shows with more than 2 levels).

### Pick what happens at the limit

Under **At the limit**, pick **Remove whitelist** or **Ban**.

### Set who can use it

Under **Who can use /advertir**, pick the staff roles. With no roles picked, it shows **Administrators only**: only members with Administrator in the server can use it.

### Save

Click **Save** on the **You have unsaved changes** bar.

> With warnings on, every level needs a role, and each level a different one. Otherwise the panel won't save and shows, for example, **Pick the role for warning 2.** or **Each level needs a different role.**

> **/advertir** is always registered on Discord, even with warnings off. While they're off, the bot replies "Warnings are off in the dashboard."

## The command on Discord

The reply is private: only whoever used the command sees it. Command and option names always stay as below, whatever the city's language.

| Command     | Options                                                        | What it does                                                                                                                                                                         |
| ----------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/advertir` | `membro` (required), `motivo` (required, up to 500 characters) | Gives the member their next warning: they go up a level, get the level's role and lose the previous one. At the last level, it applies the punishment picked under **At the limit**. |

The reply shows, for example, "**Ana** got warning **2/3** · **#004**" (English city). At the limit, it also says "Reached the limit: **Banned**." (or **Whitelist removed**). If something didn't work, the reply adds one line per problem:

| Line in the reply                                                                      | What it means                                                                         |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| "The level's role wasn't swapped: the bot's role needs to be above the warning roles." | The warning counted, but Discord didn't let the bot swap the role.                    |
| "The DM didn't arrive (the member has DMs closed)."                                    | The warning counted; the member didn't get the private message.                       |
| "Their whitelist is being removed in the city."                                        | The limit removed the whitelist and the request went to the city.                     |
| "The limit's punishment wasn't applied: ..."                                           | The warning counted, but the punishment failed. The reason is at the end of the line. |

### Who can use it

Members with one of the **Who can use /advertir** roles or the Administrator permission in the server. With no roles picked, only members with Administrator. The Manage Server permission alone isn't enough.

### When the bot refuses

| Situation                                                                             | What the bot replies                                                                                                                                                |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The caller doesn't have one of the roles                                              | "You don't have one of the roles that can use /advertir." (or, with no roles picked, "Only administrators can use /advertir until a role is allowed in the panel.") |
| The target is a bot                                                                   | "Bots don't get warnings."                                                                                                                                          |
| The target isn't in the server                                                        | "**Name** isn't in the server."                                                                                                                                     |
| Someone tries to warn themselves                                                      | "You can't use this on yourself."                                                                                                                                   |
| The target is the server owner                                                        | "The server owner can't be punished."                                                                                                                               |
| The target's highest role is equal to or above yours (the server owner always passes) | "You can only use /advertir on members whose highest role is below yours, and **Name**'s isn't."                                                                    |
| The target is in Moderation's **Protected roles** or **Protected members**            | "**Name** is on the moderation's protected list."                                                                                                                   |
| The target is already at the limit                                                    | "**Name** already reached the warning limit (3)."                                                                                                                   |
| A level has no role                                                                   | "Pick each warning level's role in the dashboard first."                                                                                                            |

> **Protected roles** and **Protected members** are the same ones /ban, /kick and /mute use, in the **Protection** group of the [Moderation](https://fivedash.fivex.gg/docs/en/discord/moderation) settings.

## Levels and limit

* Warnings start with 3 levels. You can have 2 to 10.
* The limit is the last level: with 3 levels, the 3rd warning is the limit.
* A member's level is how many standing warnings they have (the ones nobody removed).
* With each warning, the member gets the new level's role and loses the previous one. They only keep the role of the level they're at.
* At the limit, the member gets the last level's role and the punishment. After that, the bot refuses new warnings until someone removes one.
* Warnings don't expire. They only go away when someone removes them from the panel.
* Each warning has its own number (**#001**, **#002**...), separate from /ban, /kick and /mute cases.

## Each level's action

Besides its role, each level can do one thing on Discord when the member reaches it: **Role only** (nothing beyond the role, the default), **Timeout** (with a length, from 1 minute to 28 days), **Kick** or **Ban**. For example: 1st warning role only, 2nd a 1-day timeout, and 3rd (the limit) **Remove whitelist** with a kick.

* The action runs once, on the warning that took the member to the level, after the DM (once kicked or banned, they can't get the bot's messages).
* It becomes a case in Moderation's **Log**, like a /mute, /kick or /ban, with the reason "Warning N/M: reason". From there you can **Unmute** or **Unban**. A level's ban also applies in the city, with **Ban from the city whoever is banned from Discord** on.
* At the limit, the punishment (**Remove whitelist** or **Ban**) still applies. With **Remove whitelist**, the last level's action runs as well. With **Ban** at the limit, the ban replaces the last level's action.
* Removing a warning doesn't undo the level's action.
* [Protection](https://fivedash.fivex.gg/docs/en/discord/protection)'s **Staff limits** apply to /advertir on Discord: the levels' kicks and bans count toward the limit of whoever warned, like a /kick or /ban. A warning given with the panel's **Warn** follows the panel's permissions (**Manage** level in the **Moderation** area) and doesn't go through the staff limits.

The bot doesn't apply the action, and the warning still counts, when:

* the member is the server owner;
* the bot's role isn't above the member's highest role;
* the bot lacks the action's permission (**Timeout Members**, **Kick Members** or **Ban Members**);
* it's a timeout and the member is an administrator (Discord doesn't allow it) or is already timed out for longer (the bot never shortens a timeout);
* it's a kick or ban through /advertir and [Protection](https://fivedash.fivex.gg/docs/en/discord/protection) stopped whoever warned (staff limits);
* Discord refuses.

In those cases, the reply shows "The level's action wasn't applied:" with the reason, the DM doesn't mention the action, the log shows **Level action** with "not applied" and the reason, and the history shows the badge with "failed".

## Settings

### Warnings

| Field                     | What it does                                                                                                                                                                                                     | Default                        |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **Turn on warnings**      | Enables /advertir on Discord and the **Warn** button in the panel.                                                                                                                                               | Off                            |
| **Levels**                | One role per warning, in order. The last level is the limit. 2 to 10 levels.                                                                                                                                     | 3 levels, no roles             |
| **Each level's action**   | Next to each level's role: **Role only**, **Timeout** (pick the length), **Kick** or **Ban**. With **Ban** at the limit, the last level's action is turned off. See [Each level's action](#each-level-s-action). | **Role only**                  |
| **At the limit**          | **Remove whitelist**: removes the whitelist in the city and drops them if they're playing. **Ban**: bans from Discord and, with the in-city ban on, from the city.                                               | **Remove whitelist**           |
| **Who can use /advertir** | 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**) |

### In-city ban

| Field                                                | What it does                                                                                      | Default |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------- |
| **Ban from the city whoever is banned from Discord** | Covers /ban, the warnings' limit and bans made straight in Discord. Unbanning lets them in again. | On      |

It needs the city connected to FiveDash with resource 0.7.0 or newer.

### What comes from Moderation

Warnings use these options from the rest of the Moderation settings:

| Option                                                   | Effect on warnings                                                                                                                                         |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Protected roles** and **Protected members**            | Nobody can warn them.                                                                                                                                      |
| **Where to log**                                         | **Panel only**: nothing goes to Discord. **One channel**: they go to the **Log channel**. **One per command**: they go to the **/ban and /unban** channel. |
| **Notify the member by DM**                              | The member gets the warning in private.                                                                                                                    |
| **Show who punished**                                    | Puts the name of whoever warned them in the DM.                                                                                                            |
| **Server at the top of the DM** (in **Customize embed**) | The server's name and icon above the DM.                                                                                                                   |
| **Member's photo in the log** (in **Customize embed**)   | The member's photo in the corner of the log message.                                                                                                       |

Warning texts and colors are fixed: **Customize messages** and the colors in **Customize embed** only apply to /ban, /kick and /mute. A warning comes out in yellow and, at the limit, in red.

## What happens at the limit

### Remove whitelist

* **In the city:** FiveDash asks the city to remove the whitelist from each ID it unlocked for the member. If they were never unlocked through FiveDash, it applies to the accounts the city linked to that Discord. Whoever is playing is dropped with the message "You reached the city's warning limit and your whitelist was removed." (English city).
* **On Discord:** the member stays in the server, with the last level's role. The bot doesn't touch the whitelist roles.
* **In the panel:** the warning gets the **Whitelist removed · reaching the city** badge.
* **If it fails:** with no whitelist in the city, the reply shows "The limit's punishment wasn't applied: the city isn't connected to FiveDash with a whitelist" and the badge reads **Whitelist removed failed**.

### Ban

* **On Discord:** the bot bans the member, without deleting their messages. The ban becomes a **Ban** case in the **Log** tab, with the reason "Warning limit (3): " followed by the warning's reason, and goes to the log channel (with **One per command**, /ban's).
* **In the city:** with **Ban from the city whoever is banned from Discord** on and the city connected, the player is dropped if playing and can't join again. Their message is "You're banned from" with the Discord server's name and the reason.
* **In the panel:** the warning gets the **Banned** badge.
* **If it fails:** if Discord refuses the ban, the reply shows "The limit's punishment wasn't applied: Discord refused the ban (the bot's role needs to be above the member)", the badge reads **Banned failed** and nothing reaches the city.

As with any ban, if the [Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist) has **Remove the whitelist from whoever is kicked or banned** on, the banned member also loses their whitelist in the city.

> The warning doesn't show on the player's screen. Only the limit's punishment reaches the city.

## The DM and the log

### Private message

With **Notify the member by DM** on, the member gets the warning in private. The DM goes before the limit's punishment, since once banned the bot can't reach them anymore. It says which warning it is, the reason and what happens at the limit. For example (English city):

```text
You got a warning in **Cidade RP**
Warning **1** of **3**.
**Reason:** Fail RP at the square, already warned in ticket #231.
-# At warning 3, your whitelist is removed.
```

With **Ban** at the limit, the last line is "At warning 3, you're banned." On the warning that reaches the limit, it says "You reached the warning limit and your whitelist was removed." (or "and were banned."). The footer has the number, like "Warning #001". On a level with an action, the DM also says "With this warning:" and the action (for example, **Timeout for 1 day**), if the bot can apply it.

### Discord log

Each warning becomes a message in the log channel, with its number (**Warning · #001**), **Member**, **Moderator**, **Level** (for example, "2 of 3") and **Reason**. At the limit, it also shows **Limit reached** with the punishment. With **Ban** at the limit, the ban also posts its own **Ban** message in the log. On a level with an action, it shows **Level action** (for example, "Timeout for 1 day"), and the action's case posts its own message too.

* With **One per command**, warnings go to the **/ban and /unban** channel. With no channel picked there, they don't go to Discord.
* Removing a warning sends nothing to the log channel.
* In Discord's audit log, the role swap shows as "Warning 2/3: reason · by Name", and the removal as "Warning #2 removed by Name".

## The Warnings tab

**Discord → Moderation → Warnings** lists every member who ever got a warning, most recently warned first.

* **Tiles at the top**: **Warned** (members with standing warnings), **At the limit** (members who reached the limit) and **Standing** (warnings nobody removed, with how many were removed underneath).
* **Search**: by member, reason or ID.
* **Columns**: **Member**, **Level** (the bars and, for example, "2/3") and **Latest warning**.
* The list shows the latest 500 warnings.

Click a member to open their history. Each warning shows its level, the reason, the number, who gave it ("Name with /advertir" or "Name from the dashboard") and when. A removed warning is struck through, with "Removed by" and the name.

Punishment badges:

| Badge                                                                                 | When it shows                                                       |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Whitelist removed · reaching the city**                                             | The limit removed the whitelist and the request went to the city.   |
| **Banned**                                                                            | The limit banned the member.                                        |
| **Timeout for 1 day**, **Kicked** or **Banned** (with the gavel)                      | The level's action was applied.                                     |
| **Timeout for 1 day failed**, **Kicked failed** or **Banned failed** (with the gavel) | The level's action wasn't applied. Hover over the badge to see why. |
| **Whitelist removed failed** or **Banned failed**                                     | The limit's punishment wasn't applied. Hover the badge to see why.  |

## Warn from the panel

Needs the **Manage** level and warnings on.

### Open the dialog

In **Discord → Moderation → Warnings**, click **Warn**.

### Pick the member

Search by **Name, @username or ID** and click the member. Members who already have warnings show their level next to them.

### Write the reason

The **Reason** takes up to 500 characters. It goes in the member's DM, the log and Discord's audit log.

### Check and warn

The dialog shows which level they go to (for example, "Goes to level 2 of 3"), the role they get and, at the limit, the punishment. Click **Warn**.

From the panel, the role order isn't checked: anyone with **Manage** can warn any member who isn't protected. In the history and the log, the warning shows your name, "from the dashboard" (or "from the panel" in the Discord log).

## Remove a warning

Needs the **Manage** level. There's no Discord command to remove a warning.

### Open the history

In the **Warnings** tab, click the member.

### Click Remove

Click **Remove** next to the warning.

### Confirm

Click **Remove warning**. The member goes back a level and gets that level's role. If they end up with no warnings, they lose the warning role.

> Removing a warning doesn't undo the limit's punishment. For that, use /unban (or **Unban** in the **Log**) or the [Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist)'s /liberar. And if you remove a warning from someone at the limit who's still in the server, the next warning takes them to the limit again and applies the punishment again.

## FAQ

**Do warnings expire?**
No. They stand until someone removes them in the **Warnings** tab.

**I unbanned someone who reached the limit. Are their warnings reset?**
No. Unbanning doesn't touch warnings: they're still at the limit and the bot refuses new ones until someone removes one.

**The level's role wasn't swapped. Why?**
The bot needs **Manage Roles** and a role above the warning roles. Drag the bot's role up in Server Settings → Roles. The warning still counts.

**I changed the levels' roles. Do members who already have warnings change roles?**
Not right away. A member's roles only change on their next warning or when one is removed.

**The punishment failed with "the city isn't connected to FiveDash with a whitelist".**
Set up the [Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist) in the panel and connect the city with the FiveDash resource, on a framework that has a whitelist. See [Install the resource](https://fivedash.fivex.gg/docs/en/getting-started/install-resource) and [Frameworks](https://fivedash.fivex.gg/docs/en/developers/frameworks).

## Next steps

[Moderation](https://fivedash.fivex.gg/docs/en/discord/moderation)/ban, /kick and /mute, protection and the log.
[Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist)ID unlocks, /liberar and /remover.
[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.
