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

# Goodbye Messages

> Automatically send farewell messages when members leave your server

## Overview

Goodbye messages automatically send farewell messages when members leave your server. You can configure multiple goodbye messages across different channels, use custom embeds, and optionally mention the departing member.

<Info>
  Goodbye messages support both plain text with variables and custom embeds created with the embed builder.
</Info>

***

## Commands

<AccordionGroup>
  <Accordion title="goodbye add" icon="plus">
    Add a goodbye message or embed to a specific channel.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~goodbye add <#channel> <message>
      ~goodbye add <#channel> <embed_name>
      ~goodbye add <#channel> <message> ping
      ~goodbye add <#channel> <embed_name> ping
      ```

      ```bash Example theme={null}
      ~goodbye add #farewell Goodbye {user.name}, we'll miss you!
      ~goodbye add #general goodbye_embed
      ~goodbye add #logs {user.tag} just left the server ping
      ~leave add #chat farewell_embed ping
      ```
    </CodeGroup>

    **Parameters:**

    * **#channel** — Channel where the goodbye message will be sent
    * **message** — Your goodbye message (supports variables)
    * **embed\_name** — Name of a saved embed from your embed builder
    * **ping** — Optional flag to mention the departing member

    **Available Variables:**

    * `{user.mention}` — Mentions the member who left
    * `{user.tag}` — User's full tag (name#0000)
    * `{user.id}` — User's ID
    * `{guild.name}` — Server name
    * `{guild.count}` — Total member count
    * `{guild.id}` — Server ID

    **Aliases:** `leave add`, `bye add`\
    **Permissions:** Manage Server

    <Tip>
      Add the word `ping` at the end of your command to mention members when they leave!
    </Tip>
  </Accordion>

  <Accordion title="goodbye list" icon="list">
    View all configured goodbye messages for your server.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~goodbye list
      ```

      ```bash Example theme={null}
      ~goodbye list
      ~leave list
      ~bye list
      ```
    </CodeGroup>

    **What It Shows:**

    * Channel where each message is sent
    * Preview of text messages or embed names
    * Whether ping is enabled for each message
    * Numbered list for easy reference

    **Aliases:** `leave list`, `bye list`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="goodbye remove" icon="trash">
    Remove all goodbye messages from a specific channel.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~goodbye remove <#channel>
      ```

      ```bash Example theme={null}
      ~goodbye remove #farewell
      ~leave remove #general
      ~bye remove #logs
      ```
    </CodeGroup>

    **What It Does:**

    * Removes ALL goodbye messages configured for the specified channel
    * Does not affect goodbye messages in other channels
    * Shows how many messages were removed

    **Aliases:** `leave remove`, `bye remove`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="goodbye reset" icon="rotate-left">
    Reset all goodbye settings for your server.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~goodbye reset
      ```

      ```bash Example theme={null}
      ~goodbye reset
      ~leave reset
      ~bye reset
      ```
    </CodeGroup>

    **What It Does:**

    * Removes ALL goodbye messages from all channels
    * Resets the entire goodbye system
    * Cannot be undone

    <Warning>
      This action is permanent and removes all goodbye configurations. Use with caution!
    </Warning>

    **Aliases:** `leave reset`, `bye reset`\
    **Permissions:** Manage Server
  </Accordion>

  <Accordion title="goodbye test" icon="flask">
    Test the goodbye message in a specific channel.

    <CodeGroup>
      ```bash Syntax theme={null}
      ~goodbye test <#channel>
      ```

      ```bash Example theme={null}
      ~goodbye test #farewell
      ~leave test #general
      ~bye test #logs
      ```
    </CodeGroup>

    **What It Does:**

    * Sends a test goodbye message using your profile
    * Applies all variables as if you just left
    * Shows exactly how the farewell message will appear
    * Pings you if ping is enabled

    **Aliases:** `leave test`, `bye test`\
    **Permissions:** Manage Server

    <Note>
      Only tests messages configured for the specified channel. Make sure you've added a goodbye message there first.
    </Note>
  </Accordion>
</AccordionGroup>

***

## Variable Reference

Use these variables in your goodbye messages for dynamic content:

| Variable         | Output                        | Example            |
| ---------------- | ----------------------------- | ------------------ |
| `{user.mention}` | Mentions the departing member | @Username          |
| `{user.tag}`     | User's full tag               | JohnDoe#1234       |
| `{user.id}`      | User's unique ID              | 123456789012345678 |
| `{guild.name}`   | Your server's name            | My Awesome Server  |
| `{guild.count}`  | Current member count          | 1,233              |
| `{guild.id}`     | Your server's unique ID       | 987654321098765432 |

***

## How It Works

<Steps>
  <Step title="Configure Goodbye Messages">
    Set up one or more goodbye messages using `goodbye add`:

    ```bash theme={null}
    ~goodbye add #farewell Goodbye {user.tag}! We now have {guild.count} members
    ~goodbye add #logs {user.tag} has left the server
    ```
  </Step>

  <Step title="Test Your Setup">
    Verify messages work correctly:

    ```bash theme={null}
    ~goodbye test #farewell
    ```
  </Step>

  <Step title="Automatic Farewells">
    When members leave:

    * All configured goodbye messages are sent
    * Variables are replaced with actual values
    * Pings happen if enabled
    * Messages sent to their respective channels
  </Step>
</Steps>

***

## Permission Requirements

<CardGroup cols={2}>
  <Card title="Bot Permissions" icon="robot">
    The bot needs these permissions in goodbye channels:

    * View Channel
    * Send Messages
    * Embed Links (for embed goodbyes)
    * Mention @everyone (for pings)
  </Card>

  <Card title="User Permissions" icon="user">
    Command Requirements:

    * **Manage Server** — Required for all goodbye commands
  </Card>
</CardGroup>

***

## Aliases

All goodbye commands support multiple aliases:

<CardGroup cols={3}>
  <Card title="leave" icon="door-open">
    Short alias
  </Card>

  <Card title="bye" icon="b">
    Shortest alias
  </Card>

  <Card title="goodbye" icon="hand-wave">
    Full command
  </Card>
</CardGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Permission denied" icon="ban">
    **Problem:** "You need the Manage Server permission to use this command"

    **Solution:**

    * Verify you have the Manage Server permission
    * Check your role has sufficient permissions
    * Ask a server administrator for access
  </Accordion>

  <Accordion title="Goodbye not sending" icon="message-slash">
    **Problem:** Goodbye messages don't send when members leave

    **Solutions:**

    * Verify bot has Send Messages permission in goodbye channel
    * Check bot has Embed Links permission (for embed goodbyes)
    * Ensure channel hasn't been deleted
    * Run `~goodbye list` to verify configuration
    * Test with `~goodbye test #channel`
  </Accordion>

  <Accordion title="Embed not found" icon="file-circle-question">
    **Problem:** "Embed Not Found" error when using embed goodbyes

    **Solutions:**

    * Verify the embed exists: check with embed command
    * Ensure embed name is spelled correctly (case-sensitive)
    * Confirm embed is saved under your user account
    * Re-add the goodbye message with correct embed name
  </Accordion>

  <Accordion title="Variables not working" icon="code">
    **Problem:** Variables show as `{user.tag}` instead of actual values

    **Solutions:**

    * Check variable spelling exactly matches reference
    * Ensure you're using curly braces `{}`
    * Variables only work in text messages, not embed names
    * For embeds, variables must be in the embed content itself
  </Accordion>

  <Accordion title="No messages for channel" icon="question">
    **Problem:** "No Goodbye Messages Configured For \[channel]"

    **Solution:**

    * Add a goodbye message first: `~goodbye add #channel message`
    * Check you mentioned the correct channel
    * Verify with `~goodbye list` to see all configured channels
  </Accordion>

  <Accordion title="Ping not working" icon="at">
    **Problem:** Departing members aren't getting pinged

    **Solutions:**

    * Ensure you added `ping` flag when setting up goodbye message
    * Check bot has Mention @everyone permission
    * Verify with `~goodbye list` to see if (ping) appears
    * Re-add the goodbye message with the ping flag
  </Accordion>
</AccordionGroup>

***

## Usage Examples

<Tabs>
  <Tab title="Basic Goodbye">
    ```bash theme={null}
    # Simple text goodbye
    ~goodbye add #farewell Goodbye {user.tag}, we'll miss you!

    # With member count
    ~goodbye add #general {user.tag} has left. We now have {guild.count} members

    # Multiple messages
    ~goodbye add #farewell Goodbye {user.tag}!
    ~goodbye add #logs {user.tag} left {guild.name}
    ```
  </Tab>

  <Tab title="With Ping">
    ```bash theme={null}
    # Goodbye with ping
    ~goodbye add #farewell Farewell {user.mention}! ping

    # Embed with ping
    ~goodbye add #general goodbye_embed ping

    # Simple ping
    ~goodbye add #logs {user.tag} has departed ping
    ```
  </Tab>

  <Tab title="Using Embeds">
    ```bash theme={null}
    # First create an embed with the embed builder
    ~embed create goodbye_embed

    # Then use it in goodbye
    ~goodbye add #farewell goodbye_embed

    # With ping
    ~goodbye add #farewell fancy_goodbye ping
    ```
  </Tab>

  <Tab title="Multiple Channels">
    ```bash theme={null}
    # Different messages in different channels
    ~goodbye add #farewell Goodbye {user.tag}!
    ~goodbye add #logs {user.tag} left the server
    ~goodbye add #general We'll miss you, {user.tag}

    # Mix text and embeds
    ~goodbye add #farewell goodbye_embed
    ~goodbye add #logs {user.tag} has left
    ```
  </Tab>

  <Tab title="Management">
    ```bash theme={null}
    # View all goodbyes
    ~goodbye list

    # Test a goodbye
    ~goodbye test #farewell

    # Remove from specific channel
    ~goodbye remove #old-channel

    # Reset everything
    ~goodbye reset
    ```
  </Tab>
</Tabs>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Welcome Messages" icon="hand-wave" href="/welcome">
    Set up welcome messages for when members join your server
  </Card>

  <Card title="Embed Builder" icon="code" href="/embed">
    Create custom embeds to use as goodbye messages
  </Card>
</CardGroup>
