Skip to main content

Overview

Container scripts use a special syntax to create Components V2 containers, Discord’s modern alternative to embeds. This page explains every property with real examples you can copy and use immediately.
This page is written so that even if you’ve never touched a container script before, you’ll understand exactly what everything does. Every property has plain English explanations and working examples.

Basic Structure

Every container must be wrapped in {container} tags:
Components:
  • {container}: Opening tag
  • $v{property: value}: Property declarations
  • {container}: Closing tag

Property Syntax

Sets the colored accent bar on the left side of the container.Syntax:
Examples:
Note: Must be a hex color code starting with #. Use {random.color} for a different random color every time.
Blurs the entire container behind a spoiler. Users must click to reveal it.Syntax:
Example:
The most common property. Adds a block of text to your container. Supports full Discord markdown.Syntax:
Examples:
Markdown support:
  • ## Heading: Large heading
  • ### Subheading: Medium heading
  • **text**: Bold
  • *text*: Italic
  • `text`: Inline code
  • -# text: Small subtext (perfect for footers)
  • > text: Quote block
  • ~~text~~: Strikethrough
  • [text](url): Clickable link
Limits: 4000 characters per text block
Adds a visual divider line or empty space between components. Helps organize your container into clear sections.Syntax:
Types:
  • small: Thin horizontal line with small spacing
  • large: Thin horizontal line with large spacing
  • space: Empty gap with no line, just whitespace
Example:
Puts text on the left with either a thumbnail image or a link button on the right. Perfect for profile cards and user info layouts.Syntax with thumbnail:
Syntax with button:
Multiple lines of text:
Use && to separate multiple lines of text on the left side.Examples:
Note: A section must always have either thumbnail: or button: on the right side. A section with just text and nothing on the right will cause an error.
Adds clickable buttons to your container. Multiple consecutive button properties automatically group into the same row.Syntax:
Button properties:
  • label: Button text (required)
  • style: Button color: link, primary, secondary, success, danger
  • url: URL to open (required for link style)
  • custom_id: Custom ID for non-link buttons
  • emoji: Emoji on the button
  • disabled:true: Makes button unclickable
Examples:
Button styles:
  • link: Opens a URL (requires url)
  • primary: Blue/blurple
  • secondary: Gray
  • success: Green
  • danger: Red
Limits: Maximum 5 buttons per row

Complete Examples


Tips & Best Practices

Making a footerContainers don’t have a built-in footer property. Use -# at the start of a text block instead. It renders as small gray subtext, exactly like a footer:
Making a titleNo built-in title property either. Use markdown headings inside a text block:
Common Mistakes
  • Forgetting the closing {container} tag
  • Using section without a thumbnail: or button: accessory on the right side
  • Using image URLs that aren’t direct image links in galleries
  • Putting more than 5 buttons consecutively in one row
  • Not starting hex colors with #
Variable SupportAll property values support dynamic placeholders. See the Variables guide for the complete list of available variables like {user.mention}, {guild.name}, {timestamp}, etc.

Character Limits


Syntax Reference

Property Format:
Section Format:
Gallery Format:
Button Format:

Variables

Complete list of available variables

Container Builder

Full container builder command guide

Embed Scripts

Embed scripting syntax reference

Webhook

Send containers through webhooks