<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}.
Testing as you go
embed renders a script immediately so you can iterate without committing it to a config:
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
&&:
{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 from whatever image the embed already contains — author icon first, then thumbnail, then image, then footer icon. It’s the easiest way to make an embed match an avatar.
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
key: value pairs. Unlike embed nodes, they’re separated by whitespace — not &&, and not &. Quote any value containing spaces.
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
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.
