# Welcome messages

> Greet new members in a channel or by DM, give them roles, and say goodbye when they leave. No code.

You will set up a welcome message like this:

> Welcome to My Server, @Alex! You are our 1284th member.

You can also send a DM, attach a picture banner, give roles on join, and post a goodbye message.

## What you need

- The bot in your server.
- A channel for welcome messages, for example `#welcome`.
- The bot can see and send messages in that channel.

## 1. Open Welcome & Leave

On the dashboard, open **Welcome & Leave**. The page has four tabs:

| Tab | What it does |
|---|---|
| Welcome | The message in a channel, and the DM. |
| Leave | The goodbye message. |
| Roles | Roles given on join, and roles kept for members who come back. |
| Banner | A picture card with the member's avatar and name. |

## 2. Write the channel message

In the **Welcome** tab, find **Channel message**.

1. Turn on the switch.
2. In **Channel**, pick your welcome channel.
3. In **Message**, type your text:

```text
Welcome to {server}, {user}! You are our {member_count_ordinal} member.
```

4. In **Embed**, pick a saved embed if you want one. Leave it on **No embed** for text only.

Changes save on their own.

## Placeholders

Text inside `{ }` is a placeholder. The bot fills it in for each new member.

| Placeholder | Becomes |
|---|---|
| `{user}` | A ping of the new member |
| `{user.mention}` | Same as `{user}` |
| `{user.name}` | Their display name, no ping |
| `{user.id}` | Their user ID |
| `{server}` | Your server's name |
| `{member_count}` | Member count, for example `1284` |
| `{member_count_ordinal}` | Member count as a place, for example `1284th` |
| `{date}` | The date they joined |
| `{time}` | The time they joined |

> **Note:** Welcome messages use only these placeholders. Command variables like `{server.member_count}` do not work here.

## 3. Send a DM too

Under **Direct message**, turn on the switch and write a message. The bot sends it to every new member.

Some members block DMs from servers. The bot skips them. Nothing breaks.

## 4. Add a banner

A banner is a picture with the member's avatar, name and your text on it.

1. Open the **Banner** tab.
2. Pick a design under **Designs**, or change the **Background**.
3. Go back to **Welcome**.
4. Turn on **Attach the banner** in the channel message or the DM.

The banner switch is grey until you design a banner.

## 5. Test it

Press **Send me a test** under the message. The bot sends the message with your own name in it.

To see the real thing, ask a friend to join, or use a second account.

## Give roles on join

Open the **Roles** tab. In **Roles on join**, pick up to 25 roles. Every new member gets them.

> **Roles not given?:** The bot needs the **Manage Roles** permission. The bot's own role must also be **above** the roles it gives. Drag it higher in **Server Settings → Roles**.

**Retain roles on leave** gives members their old roles back when they rejoin. This needs a premium plan.

## Say goodbye

Open the **Leave** tab. Turn on **Leave message**, pick a channel and write the text:

```text
{user.name} has left {server}. Goodbye!
```

Use `{user.name}`, not `{user}`. A ping to someone who left shows as a broken mention.

## Ideas

- Point new members to your rules: `Read <#123456789012345678> first!` Put your real channel ID in.
- Want logic, like a different message for bots? Make a **Member Join** event with code. See [Events](https://ccbot.app/docs/getting-started/events).
- Track joins with a counter. See [Saving data](https://ccbot.app/docs/concepts/saving-data).
