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

# Script reference

> Every block you can use in a design script, and every variable.

A script is a design written as text. It starts with the kind of message, then blocks in curly brackets, separated by `$v`. You'll rarely write one from scratch: build in **Dashboard → Content → Designs** and press **Export** to see it. This page is for when you want to tweak one by hand.

```text theme={null}
{embed}$v{title:Server rules}$v{description:Be kind. No spam.}$v{color:#5865f2}
{components}$v{container}$v{text:## Hello {user.name}}$v{/container}
{modal}$v{title:Apply}$v{input:why|Why do you want to join?|paragraph|required}
```

Line breaks inside a block are kept exactly as you type them, and Markdown works in text.

## Embed blocks

| Block | Format | Limit |
| - | - | - |
| `content` or `text` | `{content:text outside the embed}` | 2,000 characters |
| `title` | `{title:text}` | 256 characters |
| `description` | `{description:text}` | 4,096 characters |
| `url` | `{url:https://...}` | HTTP(S) URL |
| `color` | `{color:#5865F2}` | Six-digit hex |
| `author` | `{author:name\|icon URL\|link URL}` | Name required |
| `thumbnail` | `{thumbnail:https://...}` | HTTP(S) URL |
| `image` | `{image:https://...}` | HTTP(S) URL |
| `field` | `{field:name\|value\|inline}` | Up to 25 fields |
| `footer` | `{footer:text\|icon URL}` | Text required |
| `timestamp` | `{timestamp}` or `{timestamp:ISO date}` | Valid date |
| `button` | Named `&&` options or legacy pipe format | Five per row |
| `row` | `{row}` | Starts a new button row |
| `select` | `{select:placeholder\|Label=target\|...}` | Its own row; buttons and dropdowns share five rows |

## Container blocks

| Block | Format | Notes |
| - | - | - |
| Container | `{container}` ... `{/container}` | Cannot nest |
| Accent container | `{container:#5865F2}` | Optional six-digit accent |
| Spoiler container | `{container:#5865F2\|spoiler}` | Hides its content until opened |
| Text | `{text:Markdown}` | Up to 4,000 characters per block |
| Separator | `{separator}`, `{separator:large}`, `{separator:space}` | Divider or whitespace |
| Media | `{media:URL\|description\|spoiler}` | Root or container gallery item |
| Section | `{section}` ... `{/section}` | 1–3 text blocks plus one accessory |
| Thumbnail | `{thumbnail:URL\|description\|spoiler}` | Section accessory |
| Accessory button | `{accessory-button:...}` | Section link accessory |
| Button | `{button:...}` | Row inside current container or at root |
| Select | `{select:placeholder\|Label=target\|...}` | Up to 25 options; script, modal, or role targets, each used once |
| Row | `{row}` | Flushes current buttons into a row |

## Button options

Buttons are written as `{button:label: Rules && url: https://curebot.site && emoji: 📘}`. Options are `name: value`, joined with `&&`:

| Option | Value | Purpose |
| - | - | - |
| `label` | Up to 80 characters | Visible text; optional with emoji |
| `emoji` | Unicode or custom emoji | Icon; can be the only visible content |
| `url` | HTTP(S) URL | Link button |
| `message` | Text, saved name, `text:...`, `script:...`, or short inline script | Interaction response |
| `script` | Saved script name | Render a saved Studio script |
| `modal` | Saved form name | Open a modal form |
| `role` | Role ID | Toggle a self-role |
| `style` | `primary`, `secondary`, `success`, `danger` | Interactive button colour; defaults to secondary |
| `disabled` | true/false | Makes the control non-interactive |
| `public` | true/false | Sends the response visibly in the channel |
| `private` or `ephemeral` | true/false | Sends the response only to the clicker |

## Form fields

A form (`{modal}`) asks questions in a pop-up. Each field is `{input:id|Label|style|required|placeholder}`:

| Part | Rules |
| - | - |
| ID | Starts with a letter; letters, numbers, dashes, underscores; max 32 |
| Label | 1–45 characters |
| Style | `short` or `paragraph` |
| Required | `true`/`required`, or `false`/`optional`/`no` |
| Placeholder | Optional, up to 100 characters |
| Min/max | Optional whole-number character limits; max 4,000 |

Save a form with `/automation form save`, then open it from a button with `modal: name`.

## Escaping

| Write | Result |
| - | - |
| `\n` | Newline inside a compact value |
| `\|` | Literal pipe inside a pipe-separated block |
| `\$v` | Literal `$v` instead of a new block |
| `\\` | Literal backslash |

## Showing different things to different people

Wrap blocks in `{if:…}`, `{else-if:…}`, `{else}` and `{/if}`:

```text theme={null}
{components}$v{if:{user.boost} = Yes}$v{text:Thanks for boosting!}$v{else}$v{text:Welcome!}$v{/if}
```

Comparisons: `=`, `!=`, `>`, `<`, `>=`, `<=`, `contains`, `not contains`, `starts with`, `ends with`. A variable alone is true unless it's empty, `0`, `false`, `no` or `off`.

## Deleting itself

Add `--delete 30s` at the end of any message or script, and it deletes itself after that long (from `1s` up to `365d`; `m`, `h` and `d` work too).

## Variables

`/customize variables list` shows every variable in Discord. The full list:

### Server variables

| Variable | Output |
| - | - |
| `{guild}` / `{guild.name}` | Server name |
| `{guild.id}` | Server ID |
| `{guild.count}` / `{server.count}` | Member count |
| `{guild.region}` | First explicit voice region, otherwise `Automatic` |
| `{guild.shard}` | Bot shard ID |
| `{guild.owner_id}` | Owner ID |
| `{guild.created_at}` | Creation date in UTC |
| `{guild.created_at_timestamp}` | Creation time as UNIX seconds |
| `{guild.emoji_count}` | Emoji count |
| `{guild.role_count}` | Role count |
| `{guild.boost_count}` | Boost count |
| `{guild.boost_tier}` | `Level 1–3` or `No Level` |
| `{guild.preferred_locale}` | Preferred locale |
| `{guild.key_features}` | Discord feature list |
| `{guild.icon}` | PNG icon URL |
| `{guild.banner}` | PNG banner URL |
| `{guild.splash}` | PNG invite splash URL |
| `{guild.discovery}` | PNG discovery splash URL |
| `{guild.max_presences}` | Maximum presence capacity |
| `{guild.max_members}` | Maximum member capacity |
| `{guild.max_video_channel_users}` | Video-channel user limit |
| `{guild.afk_timeout}` | AFK timeout in seconds |
| `{guild.afk_channel}` | AFK channel mention |
| `{guild.channels}` | All channel mentions |
| `{guild.channels_count}` | Total channel count |
| `{guild.text_channels}` | Text-like channel mentions |
| `{guild.text_channels_count}` | Text-like channel count |
| `{guild.voice_channels}` | Voice and stage mentions |
| `{guild.voice_channels_count}` | Voice and stage count |
| `{guild.category_channels}` | Category names |
| `{guild.category_channels_count}` | Category count |
| `{guild.vanity}` | Vanity invite URL |

### User variables

| Variable | Output |
| - | - |
| `{user}` | Username and legacy discriminator representation |
| `{user.id}` | User ID |
| `{user.mention}` | User mention; explicitly permits that user ping |
| `{user.name}` / `{username}` | Username |
| `{user.tag}` | Discriminator, commonly `0` |
| `{user.avatar}` | Global avatar URL |
| `{user.guild_avatar}` | Server avatar URL |
| `{user.display_avatar}` | Best available server/global avatar |
| `{user.joined_at}` | Server join date in UTC |
| `{user.joined_at_timestamp}` | Join time as UNIX seconds |
| `{user.created_at}` | Account creation date in UTC |
| `{user.created_at_timestamp}` | Creation time as UNIX seconds |
| `{user.created}` | Discord-formatted full creation timestamp |
| `{user.display_name}` / `{user.display}` | Current server display name |
| `{user.boost}` | `Yes` or `No` |
| `{user.boost_since}` | Initial boost date in UTC |
| `{user.boost_since_timestamp}` | Boost date as UNIX seconds |
| `{user.color}` | Highest coloured role hex |
| `{user.top_role}` | Highest non-everyone role name |
| `{user.role_list}` | Role mentions |
| `{user.role_text_list}` | Role names |
| `{user.bot}` | `Yes` or `No` |
| `{user.badges_icons}` | Profile badge icons |
| `{user.badges}` | Profile badge names |
| `{user.join_position}` | Numeric join position |
| `{user.join_position_suffix}` | Ordinal join position, such as `401st` |

### Channel variables

| Variable | Output |
| - | - |
| `{channel}` / `{channel.mention}` | Channel mention |
| `{channel.id}` | Channel ID |
| `{channel.name}` | Channel name |
| `{channel.topic}` | Topic |
| `{channel.type}` | `text`, `news`, `voice`, `stage`, `forum`, `media`, or `category` |
| `{channel.category_id}` | Parent category ID |
| `{channel.category_name}` | Parent category name |
| `{channel.position}` | Raw channel position |
| `{channel.slowmode_delay}` | Slowmode in seconds |

### Date and time variables

| Variable | Output |
| - | - |
| `{date.now}` | Numeric Pacific date |
| `{date.now_proper}` | Long Pacific date |
| `{date.now_short}` | Short Pacific date |
| `{date.now_shorter}` | Compact Pacific date |
| `{time.now}` | 12-hour Pacific time |
| `{time.now_military}` | 24-hour Pacific time |
| `{date.utc_now}` | Numeric UTC date |
| `{date.utc_now_proper}` | Long UTC date |
| `{date.utc_now_short}` | Short UTC date |
| `{date.utc_now_shorter}` | Compact UTC date |
| `{time.utc_now}` | 12-hour UTC time |
| `{time.utc_now_military}` | 24-hour UTC time |
| `{date.utc_timestamp}` / `{timestamp}` | Current UNIX seconds |
| `{date}` | Discord-formatted date |
| `{time}` | Discord-formatted time |
| `{now}` | Discord-formatted full timestamp |
| `{newline}` | A newline character |

### Moderation variables

| Variable | Output |
| - | - |
| `{moderator}` | Moderator tag/name |
| `{moderator.name}` | Moderator username |
| `{moderator.tag}` | Moderator discriminator |
| `{moderator.avatar}` | Moderator avatar URL |
| `{moderator.bot}` | `True` or `False` |
| `{moderator.color}` | Highest role colour |
| `{moderator.mention}` | Moderator mention |
| `{moderator.created_at}` | Account creation date |
| `{moderator.id}` | Moderator ID |
| `{reason}` | Action reason |
| `{duration}` | Action duration |
| `{invite_url}` | Invite generated for a supported punishment flow |
| `{action}` | Action name |

### Event, bot, and command variables

| Variable | Output |
| - | - |
| `{level.new_rank}` | New rank at level-up time |
| `{level.user_xp}` | Current XP at level-up time |
| `{boost.count}` | `1` when the contextual member is boosting, otherwise `0` |
| `{bot}` / `{bot.mention}` | Bot mention |
| `{bot.name}` | Bot username |
| `{bot.id}` | Bot user ID |
| `{bot.avatar}` | Bot avatar URL |
| `{args}` | All custom-command/template arguments |
| `{arg:1}` … `{arg:99}` | One positional argument; counting starts at 1 in scripts |


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