Skip to main content

Embeds and components

Render embeds, pages, buttons, dropdowns, and Components V2 containers from a response script.
A response script is parsed into tags of the form {key: value}. Text before the first tag becomes the message content. The $v prefix used elsewhere in raze scripting is accepted and ignored, so $v{title: Hi} and {title: Hi} are the same thing. Arguments inside one tag are separated by &&.
The embed grammar is shared with the rest of raze — the Embeds page covers it in general. This page covers what is specific to custom commands.

Embeds

1

Add embed tags to the response

2

Add fields and a footer

3

Preview before publishing

Embed tags

These are the exact key names — there are no desc, thumb, or gif shorthands in a custom command script.

Multiple embeds

Write {embed} to start a new embed block. Repeating a unique key (title, description, url, color, image, thumbnail, footer, author, timestamp) starts one implicitly.
Up to 10 embeds per message.

Pages

Split a script with {page} to send a paginated message with first / previous / next / last navigation buttons.
Each chunk is parsed as its own message, so every page can carry its own embeds.
Navigation expires. The page set is registered against the message that was sent, and those registrations are cleaned up after 48 hours. Older paginated messages stop responding to their buttons — run the command again for a fresh one.
;cc preview shows page 1 only and says so; navigation needs a real invocation.

Buttons

  • With link, the next argument must be the URL.
  • With any other style, the next argument is the custom ID; omit it and one is generated.
  • Passing a style name as the first argument makes an icon-only button with no label.
  • Maximum 5 buttons per message.

Two grammars are supported, and the tag name you type decides which one is used.
Each option is one argument, its four parts separated by |. Only the label is required.
reply=(text) is shorthand for a response action.
Add disabled: true as an argument to render the menu greyed out. Maximum 2 dropdowns per message and 25 options each.

Component actions

action= defines what happens when a button is pressed or an option is chosen.
The response may also carry embed keys — title, description, color, field, and so on.
role toggles. Pass several IDs separated by commas. Roles above raze, or roles carrying Administrator, are skipped.
style is short or paragraph. Add more input{...} blocks for more fields. With channel: set, submissions are also posted to that channel as a summary embed.
Use the same grammar as script actions, with && between arguments.
Economy actions were removed — see Actions.
The clicker is checked, not the author. raze verifies that whoever pressed the button holds the permission mapped to that action, and refuses with an ephemeral error otherwise. An action type with no permission mapping — usually a typo — is denied outright.

Containers

{container: ...} renders a Components V2 layout instead of an embed.
A container and embeds cannot coexist in one message — if the script produces any embed, the container is dropped. Use one or the other.

Beyond the message

{react: ...}, {attachment: ...}, {thread: ...}, and top-level {role: ...} / {add_role: ...} / {remove_role: ...} all work in a custom command response, alongside the {delete}, {silent}, {respond:}, {dm}, and {cooldown:} directives. See Output controls. Modals are opened from a component action= — see Open a modal.