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

# Scripting

> Learn how to create embeds for your server with haunt.

<Note>Haunt's prefix is set to `;` by default.</Note>
<Info>Use `;prefix set [character]` to change the prefix for your server.</Info>

## How can I create an embed?

To create an embed, you can create one via haunt's [embed creator](https://haunt.site/embed), this will also show a live preview of how your embed would appear in Discord.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/embed-builder.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=e6283238967aad68b5858281186b2888" width="1919" height="941" data-path="images/embeds/embed-builder.png" />
</Frame>

### How can I copy the embed script?

Click the button **highlighted** below to copy your embed script, after doing this follow the next instruction.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/copy.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=bd96c847f8a4270ff4299520f10c59df" width="1229" height="777" data-path="images/embeds/copy.png" />
</Frame>

## Creating an Embed in Discord

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/embed.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=c5e3fd977f9fd348f08a1b0612048f27" width="1171" height="253" data-path="images/embeds/embed.png" />
</Frame>

## How can I use a Variable in an Embed?

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/variable.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=18b192b23f2bbde2e62c92261eee3b06" width="1122" height="219" data-path="images/embeds/variable.png" />
</Frame>

In the attachment above, I used the `{guild.icon}` variable.<br />
For a list of haunt's available variables you can check them [here](/resources/embeds/variables)

## What commands support Embeds?

The following content below are examples of commanmds that fully support embeds for custom messages.<br />
To clear these messages run the command with the `clear` subcommand.

The following image below is another example of how to set, view and clear the custom message you've created.<br />
You can use these subcommands with the commands mentioned below.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/welcome.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=fad7e6562e16fbeb7dbed84e5e29a1c4" width="1272" height="677" data-path="images/embeds/welcome.png" />
</Frame>

* `welcome message`
* `goodbye message`
* `boost message`
* `bump message` & `bump thank`
* `discadia message` & `discadia thank`
* `level message`
* `joindm message`
* `vanity message` & `vanity revoke`
* `clan message` & `clan revoke`
* `lastfm message`
* `birthday message`
* `sticky message`
* `response create`
* `invoke` (refer to [here](/security/moderation) for the available subcommands for invoke messages)

## Create an Embed in the Discord App

Don't want to use the website?<br />
You may also use the `/embed` slash command to create an embed!<br />
<Info>This command is still in beta and may subject to break</Info>

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/app-builder.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=0046eca49c107f694a637f84f3d6c53d" width="1246" height="264" data-path="images/embeds/app-builder.png" />
</Frame>

After you're done creating the embed of your choosing.<br />
Click the `export` button to get your embed script.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/export.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=039b8ed8de716356ab7518c6bc3d68ef" width="63" height="41" data-path="images/embeds/export.png" />
</Frame>

Upon clicking this button, You may see a file uploaded of your embed script.<br />
Copy the **embed script** to use it with the commands mentioned or you can send the embed to the current channel.

<Frame>
  <img src="https://mintcdn.com/haunt-74016d1b/Z8lcyDOSfkGUViBP/images/embeds/exported.png?fit=max&auto=format&n=Z8lcyDOSfkGUViBP&q=85&s=f7da804def72fb8be30446f81f7da14a" width="1010" height="66" data-path="images/embeds/exported.png" />
</Frame>
