# Welcome

Greet people who join your Discord with a message, image, role and DM, and announce when someone leaves the server.

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

**Welcome** greets every new resident of the city as soon as they join the Discord: a message in the channel, a role right away and, if you want, a private message with buttons. When someone leaves, the bot can announce that too. This page is for the owner and the staff who run the server's Discord.

## Before you start

* **Plan:** the Discord module must be in the organization's plan (Plus, Pro and Ultra all include it).
* **Bot connected:** the city's bot must be connected to the Discord server, with the **Server Members Intent** turned on in the Developer Portal. See [Bot](https://fivedash.fivex.gg/docs/en/discord/bot).
* **Access level** on the **Welcome** area:

| Level         | What it allows                                 |
| ------------- | ---------------------------------------------- |
| **View**      | Joins and leaves (numbers and activity table)  |
| **Configure** | Messages, role and DM (save and **Send test**) |

* **Join role:** the bot's role must be **above** it on Discord. Roles above the bot show as **Above the bot** in the picker.

> Joins arrive through a service that stays connected to Discord all the time. If it's down, the page shows a notice ("The service that reports joins has been down for…") and welcomes only resume once it reconnects. **Send test** still works.

## What happens when someone joins

1. The bot logs the join in the activity (even with Welcome turned off).
2. With Welcome **On**, it gives the **Join role**, if set.
3. It posts the welcome message in the **Welcome channel**. With **Mention the member** on, it tags the person above the message so they get notified.
4. With **Private message** on, it sends a DM with the text and buttons. People who close DMs from servers won't get it.

When someone leaves, the bot logs it and, with **Announce when someone leaves** on, posts the farewell in the **Farewell channel**. Bot accounts are ignored for joins and leaves.

## Set up the welcome

### Open the page

In the dashboard, go to **Discord → Welcome**.

### Pick the channel

Under **Message → Channel**, pick the **Welcome channel**.

### Pick the role (optional)

Under **Role → Join role**, pick the role given right away to everyone who joins.

### Turn on the farewell (optional)

Under **Farewell**, turn on **Announce when someone leaves** and pick the **Farewell channel**, or leave **Same as welcome**.

### Edit the texts

In the right column, click **Messages** (**Texts and images**) to edit the welcome, the farewell and the DM. Click **Apply**.

### Turn it on and save

Turn on the switch at the top (**On**) and click **Save** in the bottom bar.

### Test it

Click **Send test**. The bot welcomes itself in the chosen channel, with its own name and picture. The **Test sent** notice confirms it.

> Using verification? Give an "unverified" role here and select it in **Verification → Remove role**, so it goes away when they pass the captcha. Don't use the verified role as the join role: everyone would skip verification. The page warns you in both cases.

## Settings

| Group        | Field                             | What it does                                                      | Default             |
| ------------ | --------------------------------- | ----------------------------------------------------------------- | ------------------- |
| **Message**  | **Channel** (**Welcome channel**) | Where the bot greets whoever just joined. Required to turn it on. | None                |
| **Role**     | **Join role**                     | Optional. Given right away to everyone who joins.                 | None                |
| **Farewell** | **Announce when someone leaves**  | A short message with the name of whoever left.                    | Off                 |
| **Farewell** | **Farewell channel**              | Keep leaves in a staff channel, if you prefer.                    | **Same as welcome** |

## Messages

Under **Messages**, the **Customize messages** dialog has three sections. Use **Restore default** to go back to the original texts in the city's language.

### Welcome

| Field                  | What it does                                                                                    | Limit | Default (English city)                                                                              |
| ---------------------- | ----------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------- |
| **Title**              | The message's title.                                                                            | 120   | "Welcome, `{nome}`!"                                                                                |
| **Message**            | The message's text.                                                                             | 1500  | "Great to have you in **`{servidor}`**! Take a look at the rules, get verified and enjoy the city." |
| **Image**              | Optional. Wide (2:1), below the text.                                                           | —     | None                                                                                                |
| **Thumbnail**          | Square, in the message's right corner: **Member's photo**, **Your own image** or **None**.      | —     | **Member's photo**                                                                                  |
| **Mention the member** | Tags them above the message so they get a notification. Mentions inside the embed don't notify. | —     | On                                                                                                  |

The message needs a title, some text or an image.

### Farewell

| Field         | What it does                                                                                    | Limit | Default (English city)                                         |
| ------------- | ----------------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------- |
| **Farewell**  | Announces when someone leaves the server (the same switch as **Announce when someone leaves**). | —     | Off                                                            |
| **Message**   | The farewell text.                                                                              | 500   | "**`{nome}`** left the server. We're now `{membros}` members." |
| **Image**     | Optional. Wide (2:1), farewell only.                                                            | —     | None                                                           |
| **Thumbnail** | **Member's photo**, **Your own image** or **None**.                                             | —     | **Member's photo**                                             |

### Private message

| Field               | What it does                                   | Limit | Default (English city)                                                                               |
| ------------------- | ---------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- |
| **Private message** | Also sends a direct message to whoever joined. | —     | Off                                                                                                  |
| **Message**         | The DM's text. Required while the DM is on.    | 1000  | "Hi, `{nome}`! Welcome to **`{servidor}`**. If you have any questions, just reach out to the staff." |
| **Buttons**         | Up to 5 buttons in a row, under the DM.        | 5     | None                                                                                                 |

Each DM button has:

| Field              | What it does                                                                                                                | Limit |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------- | ----- |
| **Style**          | **Link** (opens a website, invite or store), or **Blue**, **Gray**, **Green**, **Red** (reply with a message when clicked). | —     |
| **Text**           | The button's text, with an optional emoji. Needs text or an emoji.                                                          | 80    |
| **Link**           | **Link** style only. Must start with `https://`.                                                                            | 512   |
| **Reply on click** | Colored styles only. Without a reply, the click is just acknowledged. Only whoever clicked sees it, in their own DM.        | 1000  |

### Variables

Type `/` in a text to insert a variable. The names stay in Portuguese in every language.

| Variable     | Becomes                             |
| ------------ | ----------------------------------- |
| `{membro}`   | Mentions whoever joined (@Player)   |
| `{nome}`     | The member's display name           |
| `{servidor}` | The Discord server's name           |
| `{membros}`  | How many members the server has now |

## Embed

Under **Embed**, the **Customize embed** dialog sets the look of every welcome message.

| Field             | What it does                                                                                                            | Default   |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- | --------- |
| **Color**         | The side bar of the welcome messages.                                                                                   | Bot color |
| **Server header** | The Discord server's name and icon at the top.                                                                          | Off       |
| **Footer**        | Short text (up to 100 characters), with an optional icon from the bot's pack. The icon only shows up next to some text. | Empty     |

Images: PNG, JPG, WebP or GIF up to 1 MB.

## Overview and activity

**Overview** shows the server's member count and the **Last 7 days**:

| Number          | What it shows                                                      |
| --------------- | ------------------------------------------------------------------ |
| **Joins**       | People who joined in the last 7 days, against the previous 7 days. |
| **Joins today** | Today's joins, hour by hour, against yesterday.                    |
| **Leaves**      | People who left in the last 7 days.                                |
| **Net**         | Joins − leaves.                                                    |

The **Activity** table lists every join and leave with **Member**, **Account created**, **Event** (**Joined** or **Left**) and **When**. You can search by name or ID, filter by event, pick the **Period** (**Last 24 hours**, **Last 7 days**, **Last 30 days**, **All time**) and show 10, 25 or 50 rows per page.

## FAQ

**The test worked, but nobody gets welcomed. Why?**
Check that the switch is **On** and that the page doesn't show the notice about the service that reports joins. Also check that the **Server Members Intent** is on in the Developer Portal.

**The member didn't get the DM.**
People who close DMs from servers don't get the private message. The bot can't get around that.

**Can the farewell go to another channel?**
Yes. Under **Farewell → Farewell channel**, pick a staff channel. Without one, it goes to the welcome channel.

## Next steps

[Verification](https://fivedash.fivex.gg/docs/en/discord/verification)

Ask for a captcha before opening the channels.

[Connect](https://fivedash.fivex.gg/docs/en/discord/connect)

A pinned panel with the city's status and connect address.

[Bot](https://fivedash.fivex.gg/docs/en/discord/bot)

The bot's intents, color and emoji pack.

[Discord overview](https://fivedash.fivex.gg/docs/en/discord/overview)

Every module of the city's bot.
