Skip to main content
Anywhere a command takes a <script> argument — welcome messages, autoresponders, ticket greetings, level-up announcements, sticky messages, starboard entries — you’re writing in the same little template language. Learn it once and it applies everywhere. A script is made of nodes. A node looks like {name: value}.
That’s the whole idea. Everything below is a list of which node names exist.
You never have to write a script from scratch. !copyembed <message> (aliases embedcode, ec) takes any existing message — including one sent by another bot — and hands you back the script that would recreate it. Reply to a message with it, or pass a link.

Testing as you go

embed renders a script immediately so you can iterate without committing it to a config:
Aliases: parse, script, ce, say. Pass a channel first to send it somewhere else — !embed #announcements {title: ...}. Most modules also have a preview: !welcome view #general, !level message view, !jail message view, !counter preview <template>.

Message content

If your script contains no recognised nodes at all, the whole thing is treated as plain content — so !welcome add #general welcome {user.mention} works fine without wrapping it in {content:}.

Embeds

Multi-part nodes are split on &&:
Leave a part out to skip it. {author: {user.name}} is a name with no icon.

Multiple embeds

{embed} acts as a divider. Everything after it belongs to a new embed:

Dominant colour

{color: dominant} (or the shorthand {dominant}) pulls the accent colour out of an image the embed already contains. It’s the easiest way to make an embed match an avatar. By default it uses the first image it finds, in this order:

Picking which image

If an embed has both an author icon and a thumbnail, the author icon wins — which usually isn’t what you want when the thumbnail is the interesting picture. Name the slot you want instead:
The separator can be a dot, a colon or a space — dominant.thumb, dominant:thumb and dominant thumb are all the same thing, and names are case-insensitive.
Naming a slot prefers it rather than requiring it. Ask for dominant.thumbnail on an embed that turns out to have no thumbnail and it falls back through the remaining images rather than going black — so it’s safe in a template where the thumbnail only sometimes exists.
Dominant colour is only computed for images hosted on Discord’s own CDN — avatars, banners, icons, emojis and attachments. An arbitrary third-party image URL is left alone rather than being fetched.

Buttons

Button parts are key: value pairs. Unlike embed nodes, they’re separated by whitespace — not &&, and not &. Quote any value containing spaces.
Separating parts with & silently swallows the part before it, because & gets absorbed into the preceding value. Discord then rejects the message with something unhelpful:
Wrong
Right
&& is only for the multi-part embed nodes above — {author:}, {footer:} and {field:}.
A button with message responds privately to whoever clicked it — nobody else sees it. A button with url opens a link. A button with neither does nothing, which is occasionally what you want for decoration.
For buttons that actually assign roles, use button roles instead — {button:} in a script can’t grant anything.

Stickers

Matches a sticker available to the server by name.

Escaping

To output a literal { without it being read as a node, escape it with a backslash: \{not a node\}.

Where to go next

Variables

{user.name}, {guild.members} and the rest of what you can interpolate.

Operators

Conditionals, maths, random picks, text formatting.

Containers

Discord’s newer component layout — sections, separators, galleries.

Pagination

Turn a script into a multi-page message with navigation.