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

# Embeds

> Guide for the fundamentals of scripting embeds in raze.

# Embeds

> Guide for the fundamentals of scripting embeds in raze.

## Framework

In an embed, each setting is defined as a key-value pair separated by a colon. Multiple parameters are separated by `$v`.

```bash theme={null} theme={null}
{parameter: value}$v{parameter: value}
```

* `{` — marks the start of a parameter
* `:` — separates the key from its value
* `$v` — separates multiple parameters
* `}` — marks the end of a parameter

For commands that accept both plain text and embed code, prefix your input with `{embed}$v` to signal that it's an embed script.

```bash theme={null} theme={null}
;greet message {embed}$v{description: Welcome to {server.name}, {user.mention}!}
```

## Basic parameters

| Parameter     | Description                      | Example                      |
| ------------- | -------------------------------- | ---------------------------- |
| `content`     | Plain text above the embed       | `{content: Hello!}`          |
| `color`       | Embed border colour (hex)        | `{color: #7B68EE}`           |
| `title`       | Embed title                      | `{title: Welcome}`           |
| `description` | Embed body text                  | `{description: Hey {user}}`  |
| `url`         | Title hyperlink URL              | `{url: https://...}`         |
| `image`       | Large image below description    | `{image: https://...}`       |
| `thumbnail`   | Small image top-right            | `{thumbnail: {user.avatar}}` |
| `timestamp`   | Adds current timestamp to footer | `{timestamp}`                |

## Parameters with multiple arguments

For complex parameters, separate each sub-argument with `&&`.

<Accordion title="Author">
  * `name` — the author's display name (required)
  * `icon` — the author icon URL (optional)

  ```bash theme={null} theme={null}
  {author: raze && {server.icon}}
  {author: {user.display_name} && {user.avatar}}
  ```
</Accordion>

<Accordion title="Footer">
  * `text` — footer text (required)
  * `icon` — footer icon URL (optional)

  ```bash theme={null} theme={null}
  {footer: raze bot}
  {footer: {server.name} && {server.icon}}
  ```
</Accordion>

<Accordion title="Field">
  * `name` — field title (required)
  * `value` — field content (required)
  * `inline` — show field inline with others (optional, `true`/`false`)

  ```bash theme={null} theme={null}
  {field: Members && {server.count}}
  {field: Joined && {user.joined_at} && true}
  ```
</Accordion>

<Accordion title="Button">
  * `label` — button text (required)
  * `emoji` — button emoji (optional)
  * `url` — button link URL (required)

  ```bash theme={null} theme={null}
  {button: label: Invite && url: https://discord.com/oauth2/authorize?client_id=1231813075200643174}
  {button: label: Discord && emoji: 🔗 && url: https://discord.gg/raze}
  ```
</Accordion>

## Containers

Containers use Discord's Component V2 (cv2) layout system — a structured card-style message that replaces the embed entirely. Unlike embeds, containers support mixed content (text, images, buttons, dropdowns) in a single block.

<Warning>
  Containers and embeds are **mutually exclusive**. If `{container}` is present, any embed parameters in the same script are ignored.
</Warning>

Use `{container: ...}` with sub-tokens separated by `&&`:

```bash theme={null} theme={null}
{container: title: Welcome && text: Glad you're here. && separator && button: Visit Site && link && https://discord.gg/raze}
```

### Sub-tokens

| Token                   | Description                                          |
| ----------------------- | ---------------------------------------------------- |
| `title: (text)`         | Bold heading rendered as a section title             |
| `text: (text)`          | Plain or markdown text block                         |
| `thumbnail: (url)`      | Small image to the right of the preceding title/text |
| `image: (url)`          | Full-width image in a media gallery                  |
| `separator`             | Horizontal divider line                              |
| `color: (hex)`          | Accent color strip on the container edge             |
| `button: (label)`       | Interactive button (see button args below)           |
| `select: (placeholder)` | Dropdown menu (see select args below)                |

### Button args

After `button: (label)`, add further `&&`-separated args in order:

```
style && url_or_id && emoji: (emoji) && disabled: true
```

| Arg              | Values                                                                          |
| ---------------- | ------------------------------------------------------------------------------- |
| Style            | `primary` (blue), `secondary` (gray), `success` (green), `danger` (red), `link` |
| URL / ID         | URL when style is `link`, otherwise a custom ID string                          |
| `emoji: (emoji)` | Unicode or custom emoji                                                         |
| `disabled: true` | Renders the button as non-clickable                                             |

```bash theme={null} theme={null}
{container: button: Join && link && https://discord.gg/raze && emoji: 🔗}
{container: button: Confirm && success && button: Cancel && danger}
```

Up to **5 buttons** share a single row. A new row starts automatically when a row fills up.

### Select args

After `select: (placeholder)`, add options with `&&`-separated `option:` tokens:

```
select: (placeholder) && option: <label> && value: <val> && description: <desc> && emoji: <emoji>
```

Each `option:` starts a new choice. `value:`, `description:`, and `emoji:` apply to the preceding option. Maximum **25 options**.

```bash theme={null} theme={null}
{container: select: Pick a region && option: North America && value: na && option: Europe && value: eu && description: EU servers && emoji: 🌍}
```

### Full container example

```bash theme={null} theme={null}
{container: color: #7B68EE && title: Welcome to {server.name}! && thumbnail: {user.avatar} && text: Hey {user.mention}, you're member **#{server.count}**. && separator && text: Choose your region below. && select: Pick a region && option: North America && value: na && option: Europe && value: eu && separator && button: Support Server && link && https://discord.gg/raze && emoji: 💬}
```

## Full Embed example

```bash theme={null} theme={null}
{embed}$v{color: #7B68EE}$v{title: Welcome to {server.name}!}$v{description: Hey {user.mention}, glad you're here. You're member **#{server.count}**.}$v{thumbnail: {user.avatar}}$v{footer: {server.name} && {server.icon}}$v{timestamp}
```

## FAQ

### How do I add a new line in a description?

Press `SHIFT` + `ENTER` to insert a line break when typing embed code in Discord.

### My embed isn't showing — what's wrong?

Make sure you prefix the code with `{embed}$v` when the command expects a message. Without this, raze will treat the input as plain text.
