var trigger = dropdown_submit(Args{custom_id: "my_dropdown"})
func main() {
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Custom ID: " + trigger.custom_id,
})
}
Dropdown Submit
Triggers when a user submits a dropdown/select interaction.
- Interaction trigger: the flow can reply to the user directly, with messages, modals and more.
Options
The custom ID of the dropdown/select to listen for. Supports `*` wildcard matching (e.g. `ticket_*`).
Example: my_dropdown
Outputs
The custom ID of the dropdown/select that was submitted.
Example: my_dropdown
If the Custom ID input uses a single `*` wildcard, this is the matched portion of the submitted dropdown/select Custom ID.
Example: 123
Selected values joined by commas.
Example: option_a,option_b
JSON array containing all selected values.
Example: ["option_a","option_b"]
Number of selected values.
Example: 2
Type of select menu interaction (string_select, user_select, role_select, mentionable_select, channel_select).
Example: string_select
ID of the user who submitted the dropdown/select.
Example: 123456789012345678
Username of the user who submitted the dropdown/select.
Example: johndoe
Avatar URL of the user who submitted the dropdown/select.
Example: https://cdn.discordapp.com/avatars/123/abc.png
Channel where the dropdown/select was submitted.
Example: 123456789012345678
Server where the dropdown/select was submitted.
Example: 123456789012345678
ID of the application that received this interaction.
Example: 123456789012345678
Unique interaction ID for this dropdown/select submit.
Example: 123456789012345678
Token for this interaction, useful for webhook follow-up/edit operations.
Example: aW50ZXJhY3Rpb25fdG9rZW4
Permissions the bot/application had in the interaction channel, as a Discord bitfield string.
Example: 274877990912
Discord locale of the user who submitted the dropdown/select.
Example: en-US
Preferred locale of the server where the dropdown/select was submitted, when available.
Example: en-US
Where the interaction was used (`server`, `bot_dm`, or `private_channel`).
Example: server
ID of the message the dropdown/select is attached to.
Example: 123456789012345678
Use this trigger 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
dropdown_submit- Interaction trigger: blocks that respond to interactions (replies, modals, ...) can be used in its flows.
Options
| Field | InventScript name | Value |
|---|---|---|
| Custom ID | custom_id | e.g. "my_dropdown" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Custom ID | custom_id | e.g. "my_dropdown" |
| Wildcard Value | wildcard_value | e.g. "123" |
| Selected Values (CSV) | values_csv | e.g. "option_a,option_b" |
| Selected Values JSON | values_json | e.g. "[\"option_a\",\"option_b\"]" |
| Selected Value Count | value_count | e.g. "2" |
| Component Type | component_type | e.g. "string_select" |
| User ID | user_id | e.g. "123456789012345678" |
| Username | username | e.g. "johndoe" |
| User Avatar URL | user_avatar | e.g. "https://cdn.discordapp.com/avatars/123/abc.png" |
| Channel ID | channel_id | e.g. "123456789012345678" |
| Server ID | server_id | e.g. "123456789012345678" |
| Application ID | application_id | e.g. "123456789012345678" |
| Interaction ID | interaction_id | e.g. "123456789012345678" |
| Interaction Token | interaction_token | e.g. "aW50ZXJhY3Rpb25fdG9rZW4" |
| App Permissions | app_permissions | e.g. "274877990912" |
| User Locale | user_locale | e.g. "en-US" |
| Server Locale | server_locale | e.g. "en-US" |
| Interaction Context | interaction_context | e.g. "server" |
| Message ID | message_id | e.g. "123456789012345678" |