> ## 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.

# Embed Scripts

> Complete reference for embed scripting syntax

## Overview

Embed scripts use a special syntax to create rich, customized Discord embeds. This page explains the complete scripting system used in the `~embed create` command.

<Info>
  All scripts support dynamic variables that automatically populate with real data when the embed is sent.
</Info>

***

## Basic Structure

Every embed must be wrapped in `{embed}` tags:

```
{embed}
$v{property: value}
{embed}
```

**Components:**

* `{embed}` — Opening tag
* `$v{property: value}` — Property declarations
* `{embed}` — Closing tag

***

## Property Syntax

<AccordionGroup>
  <Accordion title="Title" icon="heading">
    The main heading of your embed.

    **Syntax:**

    ```
    $v{title: Your Title Here}
    ```

    **Examples:**

    ```
    $v{title: Welcome to the Server!}
    $v{title: {user.mention} just joined}
    $v{title: We now have {guild.count} members}
    ```

    **Limits:** 256 characters max
  </Accordion>

  <Accordion title="Description" icon="align-left">
    The main body text of your embed.

    **Syntax:**

    ```
    $v{description: Your description text}
    ```

    **Examples:**

    ```
    $v{description: Thanks for joining {guild.name}!}
    $v{description: Welcome! We're happy to have you here.}
    $v{description: You are member #{guild.count}}
    ```

    **Limits:** 4096 characters max
  </Accordion>

  <Accordion title="Color" icon="palette">
    Set the embed's sidebar color.

    **Syntax:**

    ```
    $v{color: hex_code_or_name}
    ```

    **Examples:**

    ```
    $v{color: #ff0000}
    $v{color: blue}
    $v{color: {random.color}}
    $v{color: {user.color}}
    ```

    **Supported Formats:**

    * Hex codes: `#ff0000`, `#00ff00`, `#0099ff`
    * Color names: `red`, `blue`, `green`, `purple`, `pink`, `orange`, `yellow`, etc.
    * Variables: `{random.color}`, `{user.color}`
  </Accordion>

  <Accordion title="Footer" icon="text">
    Small text at the bottom of the embed.

    **Syntax:**

    ```
    $v{footer: Footer text}
    $v{footer_icon: image_url}
    ```

    Or:

    ```
    $v{footericon: image_url}
    ```

    **Examples:**

    ```
    $v{footer: Server Info}
    $v{footer: Requested by {user}}
    $v{footer_icon: {user.avatar}}
    $v{footericon: {guild.icon}}
    ```

    **Limits:** Footer text max 2048 characters
  </Accordion>

  <Accordion title="Author" icon="user">
    Author section at the top of the embed.

    **Syntax:**

    ```
    $v{author: Author name}
    $v{author_icon: image_url}
    $v{author_url: clickable_url}
    ```

    Or:

    ```
    $v{authoricon: image_url}
    $v{authorurl: clickable_url}
    ```

    **Examples:**

    ```
    $v{author: {user.tag}}
    $v{author_icon: {user.avatar}}
    $v{author_url: {author.url}}

    $v{author: {guild.name}}
    $v{authoricon: {guild.icon}}
    ```

    **Limits:** Author name max 256 characters
  </Accordion>

  <Accordion title="Images" icon="image">
    Add visual elements to your embed.

    **Syntax:**

    ```
    $v{thumbnail: image_url}
    $v{image: image_url}
    ```

    **Examples:**

    ```
    $v{thumbnail: {user.avatar}}
    $v{image: {guild.banner}}
    $v{image: https://i.imgur.com/example.png}
    $v{thumbnail: {guild.icon}}
    ```

    **Differences:**

    * `thumbnail` — Small image on the right side
    * `image` — Large image at the bottom
  </Accordion>

  <Accordion title="URL" icon="link">
    Make the embed title clickable.

    **Syntax:**

    ```
    $v{url: https://example.com}
    ```

    **Examples:**

    ```
    $v{url: https://discord.com}
    $v{url: {author.url}}
    $v{url: https://celestia-bot-chi.vercel.app}
    ```

    **Note:** Requires a title to be set
  </Accordion>

  <Accordion title="Timestamp" icon="clock">
    Add current timestamp to footer.

    **Syntax:**

    ```
    $v{timestamp}
    ```

    **Example:**

    ```
    {embed}
    $v{title: Server Info}
    $v{timestamp}
    {embed}
    ```

    **Note:** No value needed, automatically uses current time
  </Accordion>

  <Accordion title="Fields" icon="table">
    Add structured data in name-value pairs.

    **Syntax:**

    ```
    $v{field: Name && Value && inline}
    ```

    **Examples:**

    ```
    $v{field: Member Count && {guild.count} && true}
    $v{field: Owner && {guild.owner} && true}
    $v{field: Created && {timestamp} && false}
    $v{field: Status && Online && true}
    ```

    **Format:**

    * `Name` — Field title (256 characters max)
    * `Value` — Field content (1024 characters max)
    * `inline` — `true` or `false` (displays side-by-side if true)

    **Limits:** Maximum 25 fields per embed
  </Accordion>

  <Accordion title="Message" icon="message">
    Add text content outside the embed.

    **Syntax:**

    ```
    $v{message: Your message text}
    ```

    **Examples:**

    ```
    $v{message: Welcome {user.mention}!}
    $v{message: Hey everyone, check this out!}
    $v{message: {user.mention} just boosted the server!}
    ```

    **Note:** Appears as regular text above the embed
  </Accordion>
</AccordionGroup>

***

## Button Syntax

Add interactive buttons to your embeds using `{button:}` tags:

```
{button: label:Button Text && url:https://example.com && style:link}
```

<AccordionGroup>
  <Accordion title="Button Properties" icon="rectangle-wide">
    **Required:**

    * `label` — Button text

    **Optional:**

    * `url` — External link (for link buttons)
    * `style` — Button color/style
    * `emoji` — Button emoji
    * `custom_id` — Custom identifier
    * `disabled` — Makes button unclickable

    **Syntax:**

    ```
    {button: property:value && property:value}
    ```
  </Accordion>

  <Accordion title="Button Styles" icon="palette">
    Available button styles:

    * `link` — Blue button with external link (requires `url`)
    * `primary` — Blurple/purple button
    * `secondary` — Gray button
    * `success` — Green button
    * `danger` — Red button

    **Examples:**

    ```
    {button: label:Rules && url:https://example.com && style:link}
    {button: label:Click Me && style:primary && emoji:🎉}
    {button: label:Join && style:success}
    {button: label:Leave && style:danger}
    ```
  </Accordion>

  <Accordion title="Button Examples" icon="square-check">
    **Link Button:**

    ```
    {button: label:Support Server && url:https://discord.gg/invite && style:link}
    ```

    **With Emoji:**

    ```
    {button: label:Verify && emoji:✅ && style:success}
    ```

    **Multiple Buttons:**

    ```
    {button: label:Rules && url:https://example.com/rules && style:link}
    {button: label:Support && url:https://discord.gg/support && style:link && emoji:🎫}
    {button: label:Website && url:https://example.com && style:link && emoji:🌐}
    ```

    **Limits:** Maximum 5 buttons per row, 25 buttons total
  </Accordion>
</AccordionGroup>

***

## Multiple Embeds

Create multiple embeds in one message:

```
{embed}
$v{title: First Embed}
$v{description: This is the first embed}
$v{color: red}
{embed}

{embed}
$v{title: Second Embed}
$v{description: This is the second embed}
$v{color: blue}
{embed}
```

**Note:** Separate each embed with `{embed}{embed}` tags

***

## Complete Examples

<Tabs>
  <Tab title="Basic">
    ```
    {embed}
    $v{title: Hello World}
    $v{description: This is my first embed}
    $v{color: blue}
    {embed}
    ```
  </Tab>

  <Tab title="Welcome Message">
    ```
    {embed}
    $v{title: Welcome to {guild.name}!}
    $v{description: Hi {user.mention}, thanks for joining!}
    $v{color: green}
    $v{thumbnail: {user.avatar}}
    $v{footer: Member #{guild.count}}
    $v{timestamp}
    {embed}
    ```
  </Tab>

  <Tab title="With Fields">
    ```
    {embed}
    $v{title: Server Statistics}
    $v{description: Current server information}
    $v{color: #5865f2}
    $v{field: Members && {guild.count} && true}
    $v{field: Owner && {guild.owner} && true}
    $v{field: Boosts && {guild.boost_count} && true}
    $v{thumbnail: {guild.icon}}
    $v{footer: Last updated}
    $v{timestamp}
    {embed}
    ```
  </Tab>

  <Tab title="With Buttons">
    ```
    {embed}
    $v{title: Get Started}
    $v{description: Click the buttons below!}
    $v{color: purple}
    {embed}
    {button: label:Rules && url:https://discord.com && style:link}
    {button: label:Support && url:https://discord.gg/support && style:link && emoji:🎫}
    {button: label:Website && url:https://example.com && style:link && emoji:🌐}
    ```
  </Tab>

  <Tab title="Full Featured">
    ```
    {embed}
    $v{message: Hey {user.mention}!}
    $v{title: Server Rules}
    $v{description: Please read and follow our rules}
    $v{color: #ff0000}
    $v{author: {guild.name}}
    $v{author_icon: {guild.icon}}
    $v{thumbnail: {guild.icon}}
    $v{field: Rule 1 && Be respectful && false}
    $v{field: Rule 2 && No spam && false}
    $v{field: Rule 3 && Follow Discord TOS && false}
    $v{footer: Last updated}
    $v{timestamp}
    $v{image: {guild.banner}}
    {embed}
    {button: label:Full Rules && url:https://example.com/rules && style:link}
    ```
  </Tab>

  <Tab title="Multiple Embeds">
    ```
    {embed}
    $v{title: Part 1}
    $v{description: First section}
    $v{color: red}
    {embed}

    {embed}
    $v{title: Part 2}
    $v{description: Second section}
    $v{color: blue}
    {embed}

    {embed}
    $v{title: Part 3}
    $v{description: Third section}
    $v{color: green}
    {embed}
    ```
  </Tab>
</Tabs>

***

## Tips & Best Practices

<Note>
  **Script Writing Tips**

  * Always close `{embed}` tags properly
  * Use `$v{property: value}` for all properties
  * Separate properties with newlines for readability
  * Test with `~embed preview` before creating
  * Use variables to make embeds dynamic
</Note>

<Warning>
  **Common Mistakes**

  * Forgetting closing `{embed}` tag
  * Using wrong property names (e.g., `colour` instead of `color`)
  * Exceeding character limits
  * Invalid hex color codes
  * Missing `&&` separator in fields and buttons
</Warning>

<Info>
  **Variable Support**

  All property values support dynamic variables. See the [Variables guide](/variables) for a complete list of available variables like `{user.mention}`, `{guild.name}`, `{timestamp}`, etc.
</Info>

***

## Character Limits

| Property         | Limit           |
| ---------------- | --------------- |
| Title            | 256 characters  |
| Description      | 4096 characters |
| Field Name       | 256 characters  |
| Field Value      | 1024 characters |
| Footer Text      | 2048 characters |
| Author Name      | 256 characters  |
| Fields per Embed | 25 max          |
| Buttons per Row  | 5 max           |
| Total Buttons    | 25 max          |

***

## Syntax Reference

**Property Format:**

```
$v{property: value}
```

**Field Format:**

```
$v{field: Name && Value && true/false}
```

**Button Format:**

```
{button: label:Text && property:value}
```

**Multiple Embeds:**

```
{embed}..{embed}
{embed}..{embed}
```

***

## Related Resources

<CardGroup cols={2}>
  <Card title="Variables" icon="brackets-curly" href="/variables">
    Complete list of available variables
  </Card>

  <Card title="Embed Builder" icon="code" href="/embed-builder">
    Full embed builder command guide
  </Card>

  <Card title="Webhook" icon="webhook" href="/webhook">
    Send embeds through webhooks
  </Card>

  <Card title="Auto Responders" icon="reply" href="/auto-responders">
    Use embeds in auto responses
  </Card>
</CardGroup>
