advmsgcmp_layout_actionrow(Args{
children: func() {
advmsgcmp_interaction_select_string(Args{
custom_id: "reason_select",
options: func() {
advmsgcmp_interaction_select_option(Args{label: "Ant", value: "ant"})
},
})
},
})
String Select
BlockAdvanced Messages
String select menu for advanced messages and modals.
Inputs
Custom IDRequired
Custom ID for this select component (1-100 chars).
Example: reason_select
Placeholder
Placeholder text when no value is selected.
Example: Choose an option
Min Values
Minimum selected values (0-25).
Example: 1
Max Values
Maximum selected values (1-25). Defaults to 1.
Example: 1
Disabled
Whether this select is disabled.
Optionstruefalse
OptionsRequired
String select options (1-25).
Holds blocks: String Select Option
Where it goes
This block can only be placed inside Action Row or Modal Label.
Build a bot using blocks like String Select
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
advmsgcmp_interaction_select_string- Can only be placed inside
advmsgcmp_layout_actionrow(children),modalcmp_layout_label(component).
Inputs
| Field | InventScript name | Value |
|---|---|---|
| Custom ID | custom_id | e.g. "reason_select" |
| Placeholder | placeholder | e.g. "Choose an option" |
| Min Values | min_values | e.g. "1" |
| Max Values | max_values | e.g. "1" |
| Disabled | disabled | "true", "false" |
| Options | options | blocks: func() { ... } with only advmsgcmp_interaction_select_option* blocks |
Example InventScript
More advanced messages blocks
TextText component.Message ContainerHolds text, thumbnails, galleries, and other content components.SectionHolds text alongside an accessory button or thumbnail.Action RowHolds up to 5 buttons or a single select component.SeparatorAdds vertical padding between message components, with an optional divider line.ButtonCreate a button for users to click on. Triggers with a new flow and Custom ID.GalleryTop-level container for 1-10 media items.ImageSingle media item in a gallery or a thumbnail accessory.String Select OptionOption item for a String Select component.User SelectUser select menu for advanced messages and modals.Role SelectRole select menu for advanced messages and modals.Mentionable SelectMentionable select menu for advanced messages and modals.Channel SelectChannel select menu for advanced messages and modals.