Passa al contenuto principale

Message components

Build the parts of a message, such as sections, galleries, containers, buttons, charts and attachments.

Create attachment from text​

Creates a file attachment from text content (e.g. transcripts, exports or logs).

Inputs

NameTypeRequiredDetails
File nameTextYesName of the file including its extension (e.g. "transcript.txt"). Maximum length: 100 characters.
ContentTextYesText content of the file. Maximum length: 100000 characters.

Outputs

NameTypeDetails
AttachmentAttachmentThe created attachment.

Create media item​

Builds a media item that can be reused inside thumbnails, file components, or media galleries.

Inputs

NameTypeRequiredDetails
URLURLYesSource URL or attachment://filename reference.
DescriptionTextNoOptional alt text (max 1024). Maximum length: 1024 characters.

Outputs

NameTypeDetails
MediaMedia itemThe new media item.

Create text display​

Builds a Components V2 text-display block from markdown content.

Inputs

NameTypeRequiredDetails
ContentTextYesMarkdown text up to 4000 characters. Maximum length: 4000 characters.

Outputs

NameTypeDetails
Text DisplayText display componentThe new text-display component.

Create thumbnail​

Builds a thumbnail component to use as the accessory of a section.

Inputs

NameTypeRequiredDetails
URLURLYesURL or attachment reference for the thumbnail.
DescriptionTextNoOptional alt text (max 1024). Maximum length: 1024 characters.
SpoilerYes/NoYesWhether the thumbnail is hidden behind a spoiler. Default: No.

Outputs

NameTypeDetails
ThumbnailThumbnail componentThe new thumbnail component.

Builds a single item to add into a media gallery.

Inputs

NameTypeRequiredDetails
URLURLYesURL or attachment reference for the item.
DescriptionTextNoOptional alt text (max 1024). Maximum length: 1024 characters.
SpoilerYes/NoYesWhether the item is hidden behind a spoiler. Default: No.

Outputs

NameTypeDetails
ItemMedia gallery itemThe new media gallery item.

Builds a media-gallery component containing 1-10 media items.

Inputs

NameTypeRequiredDetails
ItemsList of Media gallery itemYesThe gallery's items (1-10). Items: 1 to 10.

Outputs

NameTypeDetails
GalleryMedia gallery componentThe new media gallery.

Appends an item to an existing media gallery and returns the updated gallery.

Inputs

NameTypeRequiredDetails
GalleryMedia gallery componentYesThe gallery to extend.
ItemMedia gallery itemYesThe item to append.

Outputs

NameTypeDetails
GalleryMedia gallery componentThe updated gallery.

Render progress bar​

Renders a text progress bar for a value out of a maximum. Great for XP, health, poll shares or task completion.

Inputs

NameTypeRequiredDetails
ValueDecimal numberYesThe current value (clamped to the 0-maximum range).
MaximumDecimal numberYesThe value that represents a full bar. Must be greater than zero.
WidthWhole numberNoHow many characters wide the bar is (default 20). Value: 1 to 100. Default: 20.
Filled CharacterTextNoCharacter used for the filled portion (default █). Length: 1 to 8 characters.
Empty CharacterTextNoCharacter used for the empty portion (default ░). Length: 1 to 8 characters.
Show PercentageYes/NoNoAppend the rounded percentage after the bar. Default: No.

Outputs

NameTypeDetails
TextTextThe rendered progress bar.

Render bar chart​

Renders a horizontal ASCII bar chart from labels and values, scaled to the largest value. Wrap it in a code block for aligned columns.

Inputs

NameTypeRequiredDetails
LabelsList of TextYesOne label per bar. Must be the same length as the values. Maximum items: 25.
ValuesList of Decimal numberYesOne value per bar. Must be the same length as the labels. Maximum items: 25.
WidthWhole numberNoHow many characters wide the longest bar is (default 20). Value: 1 to 100. Default: 20.

Outputs

NameTypeDetails
TextTextThe rendered bar chart (one row per label).

Render sparkline​

Renders a compact single-line trend graph from a series of numbers using the ▁▂▃▄▅▆▇█ ramp.

Inputs

NameTypeRequiredDetails
ValuesList of Decimal numberYesThe series of numbers to plot as a sparkline. Maximum items: 400.

Outputs

NameTypeDetails
TextTextThe rendered sparkline.

Create message pages​

Creates an empty page list that you fill with add-message-page, then hand to a paginated sender.

Outputs

NameTypeDetails
PagesList of Message contentThe newly created empty page list.

Add message page​

Appends a message to a page list and returns the updated list. Build the list in a loop, one page at a time.

Inputs

NameTypeRequiredDetails
PagesList of Message contentYesThe page list to extend. Maximum items: 100.
PageMessage contentYesThe message content to append as a new page.

Outputs

NameTypeDetails
PagesList of Message contentThe updated page list.

Create separator​

Builds a separator component used to add space between V2 components.

Inputs

NameTypeRequiredDetails
DividerYes/NoYesWhether to render the divider line. Default: Yes.
SpacingSeparator spacingYesVertical spacing size. Default: Small.

Outputs

NameTypeDetails
SeparatorSeparator componentThe new separator.

Create file component​

Builds a Components V2 file component referencing an attachment.

Inputs

NameTypeRequiredDetails
FileMedia itemYesMedia item pointing to the attachment.
SpoilerYes/NoYesWhether the file is hidden behind a spoiler. Default: No.

Outputs

NameTypeDetails
File ComponentFile componentThe new file component.

Create section​

Builds a section made of 1-3 text displays plus a thumbnail OR button accessory.

Inputs

NameTypeRequiredDetails
Text DisplaysList of Text display componentYes1-3 text-display children. Items: 1 to 3.
Accessory (Thumbnail)Thumbnail componentNoThumbnail accessory. Provide this OR a button. Use only one of these: Accessory (Button)
Accessory (Button)ButtonNoButton accessory. Provide this OR a thumbnail. Use only one of these: Accessory (Thumbnail)

Outputs

NameTypeDetails
SectionSection componentThe new section component.

Create empty container​

Creates an empty container that you can populate with the add-*-to-container actions.

Outputs

NameTypeDetails
ContainerContainer componentThe newly created empty container.

Set container accent color​

Updates the accent color displayed on the left edge of a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
Accent ColorColorYesNew accent color, or empty to remove it.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Set container spoiler​

Toggles whether the entire container is hidden behind a spoiler.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
SpoilerYes/NoYesWhether the container is a spoiler.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Add text display to container​

Appends a text-display child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
Text DisplayText display componentYesThe text-display to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Add section to container​

Appends a section child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
SectionSection componentYesThe section to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Appends a media-gallery child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
GalleryMedia gallery componentYesThe gallery to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Add separator to container​

Appends a separator child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
SeparatorSeparator componentYesThe separator to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Add file to container​

Appends a file child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
File ComponentFile componentYesThe file component to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Add action row to container​

Appends an action-row child to a container.

Inputs

NameTypeRequiredDetails
ContainerContainer componentYesThe container to modify.
Action RowAction row componentYesThe action row to append.

Outputs

NameTypeDetails
ContainerContainer componentThe updated container.

Create action row (buttons)​

Builds an action row containing up to 5 buttons.

Inputs

NameTypeRequiredDetails
ButtonsList of ButtonYes1-5 buttons to place in the row. Items: 1 to 5.

Outputs

NameTypeDetails
Action RowAction row componentThe new action row.

Add button to action row​

Appends a button to an action row and returns the updated row (max 5 buttons).

Inputs

NameTypeRequiredDetails
Action RowAction row componentYesThe action row to extend.
ButtonButtonYesThe button to append.

Outputs

NameTypeDetails
Action RowAction row componentThe updated action row.
Need more help?
Can't find what you're looking for? Our team is happy to help.