# Messages

Build Discord messages in the FiveDash panel with text, images, buttons and menus. The bot sends them, edits them and gives roles on click.

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

Messages build a Discord message from text, images, separators, coloured cards, buttons and menus. The bot sends the message to the channel you pick and edits that same message every time you save. Buttons and menus can give or take roles, reply only to whoever clicked, or open a link. Everything lives in **Discord → Messages**. It's for owners and staff who want announcements, role menus and link panels without another bot.

## Before you start

* The **Discord** module must be on the organization's plan and the bot must be connected to the Discord server. See [Bot](https://fivedash.fivex.gg/docs/en/discord/bot).
* The bot must be able to send messages in the chosen channel. If Discord refuses, the panel shows **O bot não pode enviar ou editar mensagens nesse canal. Confira as permissões dele no canal.** (for now this message only exists in Portuguese).
* To give roles, the bot needs the **Manage Roles** permission, and the role it gives must sit below the bot's role.
* The number of saved messages per bot depends on the plan:

| Plan  | Messages per bot |
| ----- | ---------------- |
| Plus  | 10               |
| Pro   | 25               |
| Ultra | 50               |

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

| Level         | What it allows                                                                              |
| ------------- | ------------------------------------------------------------------------------------------- |
| **View**      | The messages, where they were sent and the preview. Opens each message but changes nothing. |
| **Configure** | Create, edit, send, duplicate and delete messages                                           |

See [Team and permissions](https://fivedash.fivex.gg/docs/en/dashboard/team-and-permissions).

## The Messages page

**Discord → Messages** lists the server's messages, with the saved-messages counter (for example, **4/50 messages saved**) and the **+** button to create another. Each row shows the name, the channel (or **channel removed**, if the channel no longer exists), when it was changed and its status. The icon at the end of the row opens the message in Discord.

| Status     | What it means                                                             |
| ---------- | ------------------------------------------------------------------------- |
| **Draft**  | Not on Discord yet.                                                       |
| **Sent**   | It's in the channel. Every time you save, the bot edits the same message. |
| **Failed** | The first send didn't work. The reason shows in the editor.               |

## Build a message

Needs the **Configure** level.

### Create the message

Click **+**. The panel creates a draft with a sample card and opens the editor.

### Fill in the details

Under **Details**, give it a **Name** (only shown in the panel), pick the **Channel** and, if you want, the roles in **Mention when sending**.

### Build the content

Under **Content**, click **Add** and pick a block: **Text**, **Images**, **Separator**, **Buttons**, **Menu** or **Card**. Use the arrows to reorder and the bin to remove. Inside a **Card**, use **Add to the card**.

### Check the preview

The preview next to it shows the message as it looks on Discord. The counter under **Content** shows how many components and characters the message uses.

### Send it

Click **Send** and confirm. The bot sends the message to the channel. **Save draft** keeps it without sending.

### The blocks

| Block         | What it does                                                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Text**      | Paragraphs, headings and lists, with emojis. In **Next to the text**, you can put a **Small image** or a **Button** on the right. |
| **Images**    | Up to 10 images side by side. Each can have a description and be hidden as a spoiler.                                             |
| **Separator** | A line or just some space, small or large.                                                                                        |
| **Buttons**   | Up to 5 buttons in a row.                                                                                                         |
| **Menu**      | A list of up to 25 options.                                                                                                       |
| **Card**      | A box with an **Edge colour** that groups other blocks.                                                                           |

### What buttons and menus do

Each button has an action in **When clicked**:

* **Give or take a role**: whoever clicks gets the role. If they already have it, the bot takes it away. Two quick clicks never give the role twice.
* **Reply only to whoever clicked**: the bot sends the text you wrote, which only that person sees.
* **Open a link**: opens the address (it must start with `https://`).

Each menu option gives or takes a role, or replies only to whoever picked it. Turn on **Pick several roles at once** to let people tick several options: each role picked is given, or taken away if they already have it. In that mode, every option has to give a role.

For safety, buttons and menus never give @everyone, roles that belong to integrations or other bots, roles above the bot's role, or roles with moderation or admin permissions. The panel warns you when you pick the role, and the bot checks again on every click.

## Edit a sent message

Change what you want and click **Save**. The bot edits the same message on Discord. If someone deleted the message on Discord, the bot sends it again in the channel. If you change the **Channel**, the bot sends it to the new channel and deletes the old one.

Under **More actions**, **Duplicate** makes a draft copy and **Delete** removes the message from the panel and from Discord. **Open in Discord** takes you to the message in the channel.

## Message as JSON

Under **Customization**, **Message as JSON** opens the message in Discord's Components V2 format. You can copy, download, import or paste JSON. Buttons and menus that already exist keep the action you chose; new buttons with a `url` become links. New images must be saved before you open the JSON.

## Limits

| What                          | Limit                                 |
| ----------------------------- | ------------------------------------- |
| Messages per bot              | 10 on Plus, 25 on Pro and 50 on Ultra |
| Components per message        | 40                                    |
| Characters per message        | 4,000                                 |
| Buttons per row               | 5                                     |
| Options per menu              | 25                                    |
| Images per block              | 10                                    |
| Roles mentioned when sending  | 5                                     |
| Reply only to whoever clicked | 2,000 characters                      |

## FAQ

**The button says the bot can't give the role.**
The role moved above the bot's role, became an integration role or gained moderation permissions. Move the bot's role up on Discord or pick another role and save.

**I deleted the message on Discord by mistake.**
Open the message in the panel and click **Save**. The bot sends it again in the same channel.

**Why can't I create another message?**
The counter reached the plan's limit. Delete old messages or change plans.

## Next steps

[Bot](https://fivedash.fivex.gg/docs/en/discord/bot)Connect the bot and adjust its profile and emojis.
[Discord overview](https://fivedash.fivex.gg/docs/en/discord/overview)Every page in the module and what each level unlocks.
[Giveaways](https://fivedash.fivex.gg/docs/en/discord/giveaways)Giveaways with a button to enter.
[Team and permissions](https://fivedash.fivex.gg/docs/en/dashboard/team-and-permissions)Give each person the right level.
