> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome and goodbye

> Welcome new members with a message, a picture card and a role.

When someone joins, your bot posts a welcome picture in your welcome channel and gives them a **Member** role. When someone leaves, it says goodbye.

## Before you start

Join and leave events need the **Server Members Intent**. In the Discord Developer Portal, open your bot, open **Bot**, and switch on **Server Members Intent**.

## Step 1: Make the welcome card

1. Open **Card Studio** and pick a **welcome** template. Press **Use this**.
2. Put the person's name on it with `{user_displayName}` and the member count with `{server_members}`.
3. Use **Send me a test** to see the real card in your DMs.
4. Save.

## Step 2: The welcome event

1. Open **Events** and make a **new event**.
2. Pick the event for **when a member joins** (search for `join`).
3. Add **Give roles** and pick your **Member** role.
4. Add **Make an image card** and pick your welcome card.
5. Add a block that sends a message **to a channel** (search for `channel`). Pick your welcome channel and write:

```text theme={null}
Welcome {user_displayName}! You are member number {server_members}. {card}
```

6. Save and switch the event **on**.

## Step 3: The goodbye event

1. Make another new event for **when a member leaves** (search for `leave`).
2. Add a block that sends a message to your welcome channel: `{user_name} left us. Bye!`
3. Save and switch it on.

## Step 4: Test it

Ask a friend to join, or join with a second account. If nothing happens, check:

* Is the event switched **on**?
* Is the **Server Members Intent** on?
* Can the bot see and write in the welcome channel?
* Open **Error Logs** to see what went wrong.

## Make it yours

* Send a private hello too: add a block that sends a **direct message** (search for `direct`).
* Count joins: add **Do the maths** on a Number variable `joins` (scope Server Specific), `+ 1`, and show `{DBVAR_joins}` in the message.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.