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

# System Messages

Automatically send messages when certain member events occur.

## Commands

There are three system message commands, each with the same subcommands.

* `welcome` - Dispatched whenever a user joins the server.
* `goodbye` - Dispatched whenever a user leaves the server.
* `boost` - Dispatched whenever a user boosts the server.

<Info>
  The following examples use the `welcome` command, but the same syntax is applied for the other system message commands.
</Info>

### Creating a system message

You can create a system message with the `welcome add` command.

<Tip>
  The `message` parameter can be raw text or an **embed** with dynamic **variables**.
</Tip>

<Info>
  The `--self_destruct` flag in system messages schedules the message for deletion after a specified time, which must be between `6` and `60` seconds.
</Info>

<CodeGroup>
  ```typescript Syntax theme={null}
  .welcome add (channel) (message) [--self_destruct [6-60]]
  ```

  ```typescript Example theme={null}
  .welcome add #general welcome to {guild} {user.mention} --self_destruct 30
  .welcome add #general {embed}$v{message: {user.mention}}$v{description: welcome to {guild.name}}
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/drown/BW9Qp3cLZ0dHHrti/images/Screenshot-2026-04-29-at-11.14.48-PM.png?fit=max&auto=format&n=BW9Qp3cLZ0dHHrti&q=85&s=a710e1ec87274459139cc6a65f1b08bf" alt="Screenshot 2026 04 29 At 11 14 48 PM" width="1328" height="376" data-path="images/Screenshot-2026-04-29-at-11.14.48-PM.png" />
</Frame>

### Removing a system message

You can remove a system message with the `welcome remove` command.

<CodeGroup>
  ```typescript Syntax theme={null}
  .welcome remove <channel>
  ```

  ```typescript Example theme={null}
  .welcome remove #general
  ```
</CodeGroup>

<Frame>
  <img src="https://mintcdn.com/drown/BW9Qp3cLZ0dHHrti/images/Screenshot-2026-04-29-at-11.19.35-PM.png?fit=max&auto=format&n=BW9Qp3cLZ0dHHrti&q=85&s=c4352897efe190ad94f016f08c234500" alt="Screenshot 2026 04 29 At 11 19 35 PM" width="996" height="350" data-path="images/Screenshot-2026-04-29-at-11.19.35-PM.png" />
</Frame>

### Related commands

<AccordionGroup>
  <Accordion title="Viewing a system message">
    You can use the `welcome view` command to view a system message.

    <CodeGroup>
      ```typescript Syntax theme={null}
      .welcome view (channel)
      ```

      ```typescript Example theme={null}
      .welcome view #general
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Viewing all system messages">
    You can use the `welcome list` command to view all system messages.
  </Accordion>
</AccordionGroup>
