# Welcome Messages
Sapphire's <img src="https://dashboard.sapph.xyz/assets/item-icons/welcome-messages.svg" alt="" style="vertical-align: middle; width: 17px;"> **Welcome Messages** module can be configured to send messages when a user **joins**, **leaves**, **boosts** or when a user **gains, or loses a specific role**. Each message is **fully customizable** and can have editable **dynamic images** attached to them.

The **Welcome Messages** module is divided into four categories:
- **Join messages** - Sends a message when a user joins the server.
- **Leave messages** - Sends a message when a user leaves the server.
- **Boost messages** - Sends a message when a user boosts the server.
- **Role assignment messages** - Sends a message when a user gains or loses a role.

i> The process of creating and managing welcome messages is the same across all categories.

## Messages
To create a welcome message, click <img src="https://dashboard.sapph.xyz/images/plus-round.svg" alt="plus" style="vertical-align: middle; width: 15px;"> **New message**. Choose a channel to send the message in or send it to a user's direct messages. When creating a new message, Sapphire's message editor will open. To edit a created message, click the pen (<img src="https://dashboard.sapph.xyz/assets/icons/rounded/pen.svg" alt="pen" style="vertical-align: middle; width: 16px;">) icon at any time.

Changing the channel can be done by clicking the channel name and selecting a new one. Alternatively, messages can be sent to a user's direct messages by choosing `Direct message`.

To delete a welcome message, click the trash (<img src="https://dashboard.sapph.xyz/assets/icons/trash.svg" alt="trash" style="vertical-align: middle; width: 16px;">) icon next to it.

<img src="https://img.sapph.xyz/1060c963-b4c6-44bd-a39c-987ab1d49700" alt="" width=650px />

### Additional settings
Click the settings (<img src="https://dashboard.sapph.xyz/assets/item-icons/general-settings.svg" alt="" style="vertical-align: middle; width: 16px;">) icon next to a message to open additional settings:

| Option | Description |
|--------|------------|
| **Send after delay** | Delays message delivery by a set time. |
| **Delete after delay** | Deletes the message after a set time. |
| **Wait for rules screening** | If enabled, Sapphire will wait for the joined user to pass the server’s [rules screening](https://support.discord.com/hc/articles/1500000466882-Rules-Screening-FAQ) to send the message. |
| **Delete when user leaves** | If enabled, the message will be deleted if the user leaves the server within the set time frame. |
| **Ignore bots** | When enabled, the message is not being sent when a bot joins. |
| **Ignore users** | When enabled, the message is only sent when a bot joins. |
| **Only first time boosts** | If enabled, Sapphire only sends the message if the user boosts the server for the first time.<br>➜ Make sure your server’s **boost system message** is enabled, so Sapphire can detect multiple boosts from the same user. |
| **Delete boost system message** | If enabled, automatically removes Discord’s default boost message, leaving only your custom Sapphire message. |
| **Require certain membership duration** | Set a minimum time a user must have been a member of the server before the leave message is sent. |

## Randomized Groups

You can group Welcome Messages together, so Sapphire randomly sends one of the grouped messages.

### How it works
- **Default probability**: By default, each message has the same probability to be sent
- **Custom probabilities**: You can manually update the message's probabilities to make certain messages send more often than others
- **No instant repeats**: Prevents the same message from being sent instantly after another (no true randomness)

### Setting up groups
1. Create a new group under the **Randomized Groups** section
2. Click the **plus** (<img src="https://dashboard.sapph.xyz/images/plus-round.svg" alt="plus" style="vertical-align: middle; width: 16px;">) icon to add messages to the group. Customize them to your liking
3. Adjust individual message probabilities using the number controls
    - Click the **gear** (<img src="https://dashboard.sapph.xyz/assets/item-icons/general-settings.svg?1606" alt="gear" style="vertical-align: middle; width: 16px;">) icon ➜ enable **Message probabilities**
    - Messages in the same group will be randomly selected when triggered
4. Prevent instant repeats
    - Click the **gear** (<img src="https://dashboard.sapph.xyz/assets/item-icons/general-settings.svg?1606" alt="gear" style="vertical-align: middle; width: 16px;">) icon ➜ enable **Prevent instant repeats of same message**

<img src="https://img.sapph.xyz/67823855-c1a5-4a64-7a9c-c4a7bc652500" alt="" width=650px />

## Dynamic images
Dynamic images are customizable images that change depending on the affected user.

w> Note that dynamic images won't be sent on their own, they have to be attached to an already created message using the `Attach to message` button.

### Create dynamic images
To create a dynamic image, click <img src="https://dashboard.sapph.xyz/images/plus-round.svg" alt="plus" style="vertical-align: middle; width: 15px;"> **New dynamic image**.

A dynamic image can be deleted at any time by clicking the **trash** (<img src="https://dashboard.sapph.xyz/assets/icons/trash.svg" alt="trash" style="vertical-align: middle; width: 16px;">) icon next to it.

### Edit dynamic images
To edit a dynamic image, click the **pen** (<img src="https://dashboard.sapph.xyz/assets/icons/rounded/pen.svg" alt="trash" style="vertical-align: middle; width: 16px;">) icon. This will open up Sapphire's image editor.

In the image editor, you can move, create and delete layers to modify the dynamic image.
Depending on the layer type, options to adjust the layer may vary. To upload your own image, click on the **plus** (<img src="https://dashboard.sapph.xyz/assets/icons/plus.svg" alt="upload" style="vertical-align: middle; width: 14px;">) icon in the upper left corner.

<img src="https://img.sapph.xyz/dda413ca-2293-44e2-ec25-d7fb63824c00" alt="" width=450px />

### Use dynamic images
To use a dynamic image, click the **attach to message** button. This will open a list of all created welcome messages. Select the welcome message you want to attach the dynamic image to and select a slot to place the image in.