# Boosts

Give groups, vehicles, commands and roles to whoever boosts your Discord while the boost lasts, and take it all back by itself when it ends.

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

With **Boosts**, whoever boosts the Discord server gets rewards for as long as the boost lasts. In the city, the character linked to the member's Discord gets groups and vehicles in the garage, and commands run in the console. On Discord, they get roles. When the boost ends, FiveDash takes back what the boost gave. A fixed panel lists the rewards and has a **Check rewards** button. Everything lives in **Discord → Boosts**. It's for owners and staff who want to thank whoever boosts the server without doing anything by hand.

## Before you start

* The **Discord** module must be on the organization's plan. Boosts come with every plan (Plus, Pro and Ultra).
* The city's bot must be connected, with its setup finished and **Server Members Intent** on (the bot setup already asks for it). That's how the bot knows who starts and stops boosting. See [Bot](https://fivedash.fivex.gg/docs/en/discord/bot).
* The bot's role needs **Manage Roles** to give and take the **Roles while boosting**, and it must be **above** those roles. In the panel channel and the log channel, it needs **View Channels**, **Send Messages** and **Embed Links**.
* For rewards in the city, the FiveM or RedM server needs the `fivedash` resource installed and connected to the panel. See [Install the resource](https://fivedash.fivex.gg/docs/en/getting-started/install-resource) and, on RedM, [RedM](https://fivedash.fivex.gg/docs/en/getting-started/redm).
* With **Only with a whitelist** on (the default), the member needs a whitelist approved through FiveDash's [Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist).

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

| Level         | What it allows                                                     |
| ------------- | ------------------------------------------------------------------ |
| **View**      | Who boosts and each one's rewards. The settings show as read-only. |
| **Manage**    | Resend rewards and check the server                                |
| **Configure** | The panel and the rewards in the city and on Discord               |

### What needs the city connected

| Reward                                                    | Where it arrives          | Needs the `fivedash` resource connected? |
| --------------------------------------------------------- | ------------------------- | ---------------------------------------- |
| **Groups in the city**                                    | On the character          | Yes                                      |
| **Vehicles**                                              | In the character's garage | Yes (resource 0.8.0 or newer)            |
| **Commands when it starts** and **Commands when it ends** | In the city's console     | Yes                                      |
| **Roles while boosting**                                  | On Discord                | No                                       |
| Panel, DMs and log                                        | On Discord                | No                                       |

Without the city connected, boosters only get the Discord rewards, and the list warns: **The city isn't connected to FiveDash: for now boosters only get the Discord rewards.**

> In the city, the resource must be version 0.7.0 or newer (vehicles, 0.8.0) and needs a MySQL driver (oxmysql, mysql-async or ghmattimysql). It keeps what each boost gave in the `fivedash_boosts` table of the city's database. To give groups and vehicles, the city's framework must deliver them through FiveDash. See [Frameworks](https://fivedash.fivex.gg/docs/en/developers/frameworks) and [FiveM resource](https://fivedash.fivex.gg/docs/en/developers/fivem-resource). With resource 0.7.x, vehicles don't arrive, and the status still shows **Delivered**.

## Turn on the rewards

### Open Boosts

In the panel, go to **Discord → Boosts** and open the **Settings** tab. While the module is off, the page opens there.

### Build the panel

In the **Panel** group, pick the **Panel channel**. Adjust the **Title**, the **Text**, the **Rewards shown** and the **Button**.

### Pick the rewards in the city

In the **Rewards in the city** group, add **Groups in the city**, **Vehicles**, **Commands when it starts** and **Commands when it ends**. Decide whether **Only with a whitelist** stays on.

### Pick the roles on Discord

In the **Rewards on Discord** group, pick the **Roles while boosting**.

### Adjust the notices

In the **Notices** group, pick the **Log channel** and set **Thank by DM** and **Notify by DM when it ends** the way you like.

### Turn it on and save

In the **Module** group, turn on **Turn on boost rewards**. Click **Save** on the **You have unsaved changes** bar. The bot posts the panel and you see **Panel posted**.

> To turn it on, the panel needs a channel, a title or a text and at least one reward: a group, a vehicle, a start command or a role. **Commands when it ends** alone aren't enough. If something is missing, it won't save and shows, for example, **Pick at least one reward: something in the city, a command or a role on Discord.**

When you turn it on, FiveDash checks the whole server and delivers the rewards of whoever already boosts. With **Thank by DM** on, each of them also gets the thank-you DM.

> **Rewards shown** is only the text of the panel and the DMs. What's actually delivered are the groups, vehicles, commands and roles. Keep both lists in line.

## How FiveDash notices a boost

A boost starts and ends when Discord says so. FiveDash finds out in four ways:

* **Right away**: the bot hears from Discord when a member starts or stops boosting. This needs the bot online on the Gateway.
* **From the button**: **Check rewards** checks whoever clicks it.
* **Leaving the server**: whoever leaves the Discord server loses the boost.
* **Server check**: once a day, FiveDash checks the whole member list. Anyone with **Manage** can force it with **Check server**. If the member list doesn't come back complete, nobody is ended in that check.

Each start delivers the rewards once, and each end takes them back once, however many of these report it.

## What happens when the boost starts

### The roles on Discord

The bot gives the **Roles while boosting**. A role the member already had doesn't count as the boost's and is never removed, not even after a **Resend**, a whitelist approved in the city or a saved change to the rewards.

### The checks

If there are rewards in the city, FiveDash checks that the city is connected (otherwise **City offline**) and, with **Only with a whitelist**, that the member has an approved whitelist (otherwise **No whitelist**).

### Sending to the city

The request goes to the city, and the status becomes **Sending**.

### Delivery to the character

The resource looks for the character linked to the member's Discord. It gives the groups the character doesn't have yet, the vehicles, and runs the **Commands when it starts** once. If the player is in the city, a notice shows on their screen.

### The confirmation

The city confirms, and the status becomes **Delivered**, with the character.

## What's taken back when the boost ends

The boost ends when Discord says it ended, when the member leaves the server or when the team switches the module off. Then FiveDash:

* removes the roles the boost gave on Discord (except when the member left the server, since they're no longer there);
* removes, in the city, the groups the boost gave. A group the character already had before the boost (given by staff or bought in the store) is never removed;
* removes the **Temporary** vehicles the boost gave, only that vehicle, never another one of the same model the member bought;
* runs the **Commands when it ends** once.

**Permanent** vehicles stay with the member.

> Whatever the **Commands when it starts** gave (items, money, anything) doesn't leave by itself. If you need to undo it, use the **Commands when it ends**.

The status shows **Removing** until the city confirms, then **Removed**. If the city never got this boost's rewards (for example, it stayed on **No whitelist**), there's nothing to take back there and the **Commands when it ends** don't run.

The **Your boost ended** DM only goes out when Discord ends the boost. Members who leave the server, or lose the boost because the team switched the module off, get no DM.

## Player out of the city or city down

* **City down** (server off or restarting, but connected to FiveDash): the request waits in the queue and goes out when the resource syncs again. The status stays **Sending** (or **Removing**, at the end of the boost) until then.
* **City not connected to FiveDash**: the status shows **City offline** and only the Discord roles go out. Once you connect the city, the rewards go out in the daily check, with **Check server**, with **Resend** or when the member clicks **Check rewards**.
* **No character linked to the Discord** (with groups, vehicles or commands that use `{id}`): the status becomes **Failed**, with the reason "no character linked to this Discord in the city". Ask the member to join the city with this Discord and click **Check rewards**, or use **Resend**.
* **Something couldn't be delivered** (for example, the city's framework only delivers it with the player inside): FiveDash tries again, up to 5 times in total. If it still fails, the status becomes **Failed** with the reason the city gave.

What already arrived isn't delivered twice, and the **Commands when it starts** don't run again on a retry. Once a day, the server check retries everyone on **Failed**, **No whitelist** or **City offline**. And when a member on **No whitelist** or **Failed** gets their whitelist approved in the city, the rewards go out right away.

## Settings

### Module

| Field                     | What it does                                                                                                              | Default |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| **Turn on boost rewards** | Posts the panel and delivers the rewards to whoever boosts. While off, the panel leaves Discord and nobody gets anything. | Off     |

### Panel

| Field             | What it does                                                                                                                                                                                                | Default                                                                        |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **Panel channel** | Where the panel with the rewards and the button stays.                                                                                                                                                      | None                                                                           |
| **Title**         | Highlighted at the top of the panel. Up to 120 characters.                                                                                                                                                  | "Boost rewards" (English city)                                                 |
| **Text**          | Explains how it works. Takes emojis and Discord formatting. Up to 1,500 characters.                                                                                                                         | A default text about the rewards and the button                                |
| **Rewards shown** | The list on the panel and in the DMs. Up to 10 items, up to 120 characters each.                                                                                                                            | "**Booster** group in the city" and "Exclusive role on Discord" (English city) |
| **Button**        | The **Button emoji** and the **Button text** (up to 40 characters). Shows whoever clicks where their rewards are; only they see the answer. With no text, the button says **Check rewards** (English city). | 💎 and **Check rewards**                                                       |

### Rewards in the city

| Field                       | What it does                                                                                                                                                                  | Default                                     |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| **Groups in the city**      | The character holds these groups while boosting. Letters, numbers, dot, dash and underscore, up to 40 characters. Up to 10 groups.                                            | None                                        |
| **Vehicles**                | They go to the character's garage, by spawn name (letters, numbers, dot, dash and underscore, up to 40). Up to 10, one per model. Each one is **Temporary** or **Permanent**. | None (each new one starts as **Temporary**) |
| **Commands when it starts** | Run once in the city's console when the boost starts. Up to 10 commands.                                                                                                      | None                                        |
| **Commands when it ends**   | Run once when the boost ends or the member leaves the server. Up to 10 commands.                                                                                              | None                                        |
| **Only with a whitelist**   | Rewards in the city only go to members with a whitelist approved through FiveDash.                                                                                            | On                                          |

### Rewards on Discord

| Field                    | What it does                                                                                                                                  | Default |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **Roles while boosting** | On top of Discord's own booster role. The ones the boost gave are removed when it ends (a role the member already had stays). Up to 10 roles. | None    |

### Notices

| Field                         | What it does                                                                    | Default            |
| ----------------------------- | ------------------------------------------------------------------------------- | ------------------ |
| **Log channel**               | Each boost that starts or ends becomes a message.                               | **Dashboard only** |
| **Thank by DM**               | When the boost starts, the member gets the list of rewards by DM.               | On                 |
| **Notify by DM when it ends** | When the boost ends, the member is told by DM that the rewards were taken back. | On                 |

The preview next to it shows the result in five views: **Panel**, **Check** (**Delivered**, **No whitelist** or **Not boosting**), **DM**, **Ended** and **Log**.

### Temporary and permanent vehicles

* **Temporary**: stays while the boost lasts. When it ends, only the vehicle the boost gave leaves. On Qbox and ox_core, if the framework doesn't return the delivered vehicle's plate or ID, it isn't removed when the boost ends.
* **Permanent**: given once per member and stays with them, even if they boost again later.
* On frameworks that keep one vehicle per model, if the character already owns that model, the boost doesn't give another and never takes theirs.

> In a RedM city, the field is called **Horses and wagons** and they go to the character's stable. That needs a stable script in the city (VORP: `vorp_stables`, `bcc-stables` or `bcc-wagons`; RSG: `rsg-stables` or `rsg-horses`, and `rsg-wagons` for wagons). Without one, the status is **Failed**. The model name takes up to 60 characters.

### Commands

* One command per line, no `;` and up to 200 characters.
* `{id}` becomes the character's ID and `{discord}` becomes the member's Discord ID. Example: `giveitem {id} booster_crate 1`.
* A command that uses `{id}` needs a character linked to the Discord. Without one, the delivery fails.
* The resource never runs commands that take the server down or change it (`quit`, `stop`, `restart`, `set` and others). If `AllowedCommands` in `loja.lua` has a list, only the commands on it run. See [FiveM resource](https://fivedash.fivex.gg/docs/en/developers/fivem-resource).
* If a command doesn't run, the resource warns in the server console, but the delivery stays **Delivered**.

## What members see on Discord

The bot writes in the city's language. The texts below are what an English city sees.

* **The panel**: the server's name and icon, the **Title**, the **Text**, the **Rewards** list and the button.
* **The button's answer**: only whoever clicked sees it. It says since when they've been boosting, where their rewards are in the city and how many roles they got on Discord.
* **The DMs**: **Thanks for boosting!** when the boost starts (with **Thank by DM**) and **Your boost ended**, with **What was removed**, when it ends (with **Notify by DM when it ends**).
* **In the city**: if the player is inside, a notice on screen when the rewards arrive and when they leave.
* **The log**: **New boost** and **Boost ended**, with the **Member** and **Since** when.

What the button's answer says about the city:

| Status           | Answer                                                                                                 |
| ---------------- | ------------------------------------------------------------------------------------------------------ |
| Not boosting     | "You're not boosting the server right now." and the list of rewards                                    |
| **Sending**      | "Your rewards are on their way to the city now."                                                       |
| **Delivered**    | "Rewards delivered in the city (character N)."                                                         |
| **Failed**       | "The rewards didn't reach the city", the reason and "Join the city with this Discord and click again." |
| **No whitelist** | "To get the rewards in the city, you need an approved whitelist."                                      |
| **City offline** | "The city isn't connected right now. Your rewards arrive as soon as it's back."                        |

Clicking the button also counts as a check: whoever boosts and wasn't on the list yet starts getting the rewards, and whoever stopped boosting loses them. For whoever is already on the list, the rewards go to the city again, at most once every 30 seconds (a request still on **Sending** is only repeated after 5 minutes).

## The boosters list

The **Boosters** tab shows each member and where their rewards are.

* **Tiles at the top**: **Boosting** (on the server now), **Rewards delivered** (confirmed by the city), **Need attention** and **Last check**.
* **Filters**: **Boosting**, **Attention**, **Ended** and **All**.
* **Search**: by part of the name, or by the full Discord ID or character.
* **Columns**: **Member** (with how many roles the boost gave), **Since** and **In the city**.
* **Per page**: 20 members.

Statuses in the **In the city** column:

| Status           | What it means                                                                 |
| ---------------- | ----------------------------------------------------------------------------- |
| **Sending**      | Waiting for the city to confirm.                                              |
| **Delivered**    | The city confirmed the rewards. Shows the character.                          |
| **Failed**       | The city didn't deliver. Shows the reason.                                    |
| **No whitelist** | Needs a whitelist approved through FiveDash. Arrives by itself once approved. |
| **City offline** | The city isn't connected to FiveDash.                                         |
| **Removing**     | Waiting for the city to remove the groups and what was temporary.             |
| **Removed**      | The groups were removed and the end commands ran.                             |
| **Discord only** | No rewards in the city set up.                                                |

**Attention** gathers whoever is boosting and is on **Failed**, **No whitelist** or **City offline**.

### Resend and check

Needs the **Manage** level, with the module on.

* **Resend**, on the member's row, sends the rewards to the city again. It doesn't show while **Sending**. Wait half a minute between sends; before that you see **It was just sent. Wait half a minute to resend.**
* **Check server** checks every member on Discord now: it starts whoever boosts, ends whoever stopped and retries whoever needs attention. The **Server checked** notice shows how many are boosting, how many are new and how many were ended. You can use it once a minute.

## Change the rewards while people are boosting

* When you save changes to the groups, vehicles, start commands, roles or **Only with a whitelist**, FiveDash sends the new list to whoever already boosts. New groups, vehicles and roles arrive, and roles the boost gave that are taken off the list are removed. If Discord doesn't answer right then, a new role arrives later, with **Resend** or the **Check rewards** button.
* Groups and temporary vehicles taken off the list leave the city as long as some reward in the city remains. If you remove them all, what was already delivered only leaves when the boost ends.
* A new command in **Commands when it starts** only runs for whoever starts boosting afterwards.
* **Commands when it ends** apply as they are when the boost ends.

> Switching off **Turn on boost rewards** ends every boost right away: the roles are removed, the city takes back what the boost gave and runs the **Commands when it ends**. Nobody gets the end DM, and the panel leaves Discord.

## Limits

| What                                                    | Limit                                     |
| ------------------------------------------------------- | ----------------------------------------- |
| **Rewards shown**                                       | 10 items, up to 120 characters each       |
| **Groups in the city**                                  | 10, up to 40 characters each              |
| **Vehicles**                                            | 10, one per model                         |
| **Commands when it starts** / **Commands when it ends** | 10 each, up to 200 characters each        |
| **Roles while boosting**                                | 10                                        |
| **Title** / **Text** / **Button text**                  | 120 / 1,500 / 40 characters               |
| **Resend** or a retry from the button                   | Once every 30 seconds per member          |
| **Check server**                                        | Once a minute (and once a day, by itself) |

## FAQ

**The member boosted and got nothing in the city.**
Check the **In the city** column in the **Boosters** tab. **No whitelist** needs a whitelist approved through FiveDash. **Failed** shows the reason: the most common is having no character linked to the Discord. Ask them to join the city with this Discord and use **Resend**.

**Does the player need to be online?**
Not for the request to reach the city. The resource delivers to the character linked to the Discord. If the city's framework can only deliver something with the player inside, the delivery becomes **Failed** and they need to join and click **Check rewards**.

**Does the VIP they bought in the store leave when the boost ends?**
No. A group bought in the store never leaves when the boost ends, even if they bought it during the boost. The boost only takes back what it gave.

**The bot went offline. Did I miss any boosts?**
No. The next daily check picks up the boosts that started or ended in the meantime. To skip the wait, use **Check server** or ask the member to click **Check rewards**.

**Can I use only Discord roles, without the city?**
Yes. Pick only **Roles while boosting**. With no rewards in the city, nothing goes to the game server and the resource isn't needed.

## Next steps

[Install the resource](https://fivedash.fivex.gg/docs/en/getting-started/install-resource)Connect the city to FiveDash so the rewards arrive.
[FiveM resource](https://fivedash.fivex.gg/docs/en/developers/fivem-resource)The resource's loja.lua, tables and commands.
[Whitelist](https://fivedash.fivex.gg/docs/en/discord/whitelist)Approve players' IDs through Discord.
[Nominations](https://fivedash.fivex.gg/docs/en/discord/nominations)Members nominate friends, with a bonus for boosters.
