# Welcomer

The Welcomer system lets you send automatic messages when members join or leave your server, or send DMs to new members. Messages support rich embeds with [variables](/reference/variables.md) for dynamic content.

***

## Quick Setup

1. Use `/welcome channel #your-channel` to set the welcome channel
2. Use `/welcome gui` to open the message editor
3. Customize your message with [variables](/reference/variables.md)
4. Use `/welcome on` to enable welcome messages
5. Use `/welcome test` to preview your message

Repeat the same steps for leave messages (`/leave`) and join DMs (`/joindm`).

***

## Message Types

Each welcomer type (welcome, leave, join DM) has **five** message variants to handle different scenarios:

| Type         | When it's used                                   |
| ------------ | ------------------------------------------------ |
| **Normal**   | The inviter was successfully identified          |
| **Vanity**   | The member joined using the server's vanity URL  |
| **Bot**      | A bot was added to the server                    |
| **No Perms** | The bot doesn't have permission to track invites |
| **Unknown**  | The inviter could not be determined              |

{% hint style="info" %}
Set each type separately to provide accurate information. For example, the `unknown` type shouldn't reference `{inviter}` since the inviter is unknown.
{% endhint %}

***

## Commands

### Welcome Messages

| Command                       | Description                  |
| ----------------------------- | ---------------------------- |
| `/welcome gui`                | Open the modal editor        |
| `/welcome text <type> [text]` | Set the welcome message text |
| `/welcome channel <#channel>` | Set the welcome channel      |
| `/welcome on`                 | Enable welcome messages      |
| `/welcome off`                | Disable welcome messages     |
| `/welcome test <type>`        | Preview a welcome message    |
| `/welcome show`               | Show current configuration   |

### Leave Messages

| Command                     | Description                |
| --------------------------- | -------------------------- |
| `/leave gui`                | Open the modal editor      |
| `/leave text <type> [text]` | Set the leave message text |
| `/leave channel <#channel>` | Set the leave channel      |
| `/leave on`                 | Enable leave messages      |
| `/leave off`                | Disable leave messages     |
| `/leave test <type>`        | Preview a leave message    |
| `/leave show`               | Show current configuration |

### Join DM Messages

| Command               | Description                  |
| --------------------- | ---------------------------- |
| `/joindm gui`         | Open the modal editor        |
| `/joindm text <text>` | Set the join DM message text |
| `/joindm on`          | Enable join DM messages      |
| `/joindm off`         | Disable join DM messages     |
| `/joindm test`        | Preview your join DM message |
| `/joindm show`        | Show current configuration   |

***

## Example Messages

### Simple Welcome

```
Welcome {member_mention} to **{guild_name}**! 🎉
You were invited by **{inviter}** who now has **{inviter_invites}** invites.
We are now **{guild_count}** members!
```

### Embed Welcome (JSON)

Welcomer messages support Discord embed format using JSON. Use the GUI editor (`/welcome gui`) for the easiest editing experience, or write the JSON directly.

### Unknown Inviter

```
Welcome {member_mention} to **{guild_name}**! 🎉
We couldn't determine who invited you.
We are now **{guild_count}** members!
```

***

## Variables

See the full list of available variables on the [Variables](/reference/variables.md) page.

**Welcome-only variables** (not available in leave or join DM):

| Variable        | Description                         |
| --------------- | ----------------------------------- |
| `{invite_code}` | The invite code the member used     |
| `{invite_uses}` | Number of times the invite was used |
| `{invite_url}`  | Full invite URL                     |

***

## Tips

* Use the **GUI editor** (`/welcome gui`) for the easiest experience — it opens a Discord modal where you can type your message.
* Always set up an **Unknown** message type for when the bot can't identify the inviter.
* Use `/welcome test` to preview your message before enabling it.
* The bot needs the **Send Messages** and **Embed Links** permissions in your welcome/leave channel.
* For join DMs to work, the member must have DMs enabled. Use `/verification channel` to set a fallback channel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.invite-count.xyz/features/welcomer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
