# Setting up Leave

{% hint style="info" %}
Replace `[prefix]` with your server's prefix.
{% endhint %}

## Creating a Leave Channel

1. **Head over to your Discord Server**

   Click on the Discord Server that you would like to setup leave for using serenity.
2. **Create the channel**

   Setup permissions for the channel with the desired name, for this example we will be using `#leave`

## Creating an Embed and setting the Leave Channel

1. **Creating the Leave Embed**

   Run the \[prefix]embedsetup command to create the leave embed which you can use variables with. For more information regarding variables click [here](https://docs.serenity.wtf/embeds/content-in-embeds/variables).
2. **Setup the Leave Channel**

   Run the \[prefix]leave add command, which will give you further information.

```
// Syntax
[prefix]leave add [channel] [code]

// Example
[prefix]leave add #welcome {embed}{title: Bye!}$v{author: {user.name}}
```

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2Fct3GlpPj0vsQoZBQkcUe%2Fimage.png?alt=media&#x26;token=0d0d8550-5fbc-4996-91fc-3fe338c627d1" alt=""><figcaption></figcaption></figure>

## Remove Leave Embeds

If you wish to remove the leave system from a channel, or you want to remove all embeds on the current server, you can run:

```
// Remove a specific Leave Embed
[prefix]leave remove #leave

//Remove all Leave Embeds from the Server
[prefix]leave reset
```

<figure><img src="https://2138524749-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKC3Q8gA6avaSjTCmPTwv%2Fuploads%2F4CDrWJH6QVOTHUUP39FX%2Fimage.png?alt=media&#x26;token=4a173586-a0a5-47b9-83a8-f42f147fffaf" alt=""><figcaption></figcaption></figure>


---

# 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.serenity.wtf/get-started/welcome-and-leave/setting-up-leave.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.
