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

# Embeds

> Build messages with the interactive builder or with embed scripts, using the same variables everywhere.

Two things share this name. `/embed` is an interactive builder for a single message. **Embed
scripting** is a small language that renders embeds and cards from text · and it's what level-up
messages, vanity announcements and honeypot warnings all use underneath.

## The builder

```text theme={null}
/embed
```

A Components V2 panel with a live preview. It covers title, description, colour, thumbnail, image,
link buttons and role buttons · so the thing you're editing is the thing that gets posted.

Role buttons are the usual way to build a verification gate: label plus role, click to grant.

## Posting from a script

| Command | What it does |
| - | - |
| `/embedcreate [channel] [preview]` | Post a message from a script · `preview:true` shows it only to you |
| `/embedvariables` | Every variable a script can use |
| `/embedguide` | A page-by-page guide to embeds and cards |

Prefix forms: `,ce <script>` posts, `,vars` lists variables, `,guide` opens the guide.

`/embedcreate` needs **Manage Messages**, because it speaks as the bot in the channel you point it
at.

## Script structure

A block is a key, a colon, and its content:

```text theme={null}
{title: hello {user}}
```

* `{` begins a block, `:` separates the key from its content, `}` ends it.
* `&&` separates arguments inside a block that takes more than one.
* Blocks are read left to right; text between them is ignored, so line breaks are free.

`/embedvariables` (or `,vars`) lists every variable currently supported.

## Embeds

Start with `{embed}` and add blocks:

```text theme={null}
{embed}{message: -# {user} just joined}{title: Welcome to {guild.name}}{description: Hey {user.mention}, you're member **{guild.member_count}**.}{color: #5865f2}{thumbnail: {user.avatar}}{footer: Enjoy your stay}
```

| Block | Purpose |
| - | - |
| `{message: …}` | Text posted above the embed, up to 2,000 characters |
| `{title: …}` | Embed title |
| `{description: …}` | Body text |
| `{color: #hex}` | Accent colour |
| `{thumbnail: url}` · `{image: url}` | Thumbnail and full image |
| `{author: …}` | Author line |
| `{field: …}` | A field, with `&&` between its arguments |
| `{footer: text && icon}` | Footer, optionally with an icon URL |
| `{button: label: … && url: …}` | A link button |

## Cards

Containers are the native Components V2 look, and they're what the bot's own panels use:

```text theme={null}
{container}{color: #5865f2}{heading: Server rules}{content: -# 1. Be kind
-# 2. Keep it on topic}{separator}{button: label: Open the rules && url: https://discord.com/channels/{guild.id}}
```

| Block | Purpose |
| - | - |
| `{container}` | Begins a card |
| `{heading: …}` · `{content: …}` | Title and body |
| `{separator}` · `{separator: invisible}` | Divider, visible or spacing-only |
| `{section: ## title && text: … && thumbnail: url}` | A section with text and a thumbnail |
| `{button: label: … && style: primary && response: …}` | A button that replies privately |
| `{menu: placeholder: … && option: label: … && role: …}` | A select menu that hands out roles |
| `{gallery: url && url}` | Image gallery |

```text theme={null}
{container}{section: Need a hand? && button: label: Help && style: primary && response: Ask in {channel.mention} and staff will help you out.}
```

## Variables

Scripts are filled in when the message is sent · `{user}`, `{guild.name}`, `{channel.mention}`,
`{level}` and dozens more. Dots, dashes and underscores are interchangeable, case doesn't matter, and
unknown variables are sent as raw text rather than erroring.

> [card] [Variables](https://docs.criminal.work/features/variables.md)
>
> The full list, grouped by user, server, channel, bot, time, level-up and honeypot.

## Limits

| Thing | Limit |
| - | - |
| Embeds per message | 10 |
| Embed text in total | 6,000 characters |
| Title · description | 256 · 4,096 characters |
| Fields per embed | 25 |
| Field name · value | 256 · 1,024 characters |
| Text above an embed | 2,000 characters |
| Card text in total | 4,000 characters |
| Blocks inside a card | 30 |
| Buttons per row · rows per message | 5 · 5 |
| Button label · link URL | 80 · 2,048 characters |
| Images per gallery · menu options | 10 · 25 |

Criminal validates all of these before sending and names the limit you broke, so nothing fails
silently.

## Where scripts run

* `/embed` · posted directly
* `levelup-message` and `levelup-dm-message` · level-up cards
* `vanity-message` · vanity announcements
* Honeypot warning and trigger DM

Anything you build for one of those works in the others, since they share the same renderer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.