Dropdown Submit

Interaction triggerInteractions

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

Custom IDRequired

The custom ID of the dropdown/select to listen for. Supports `*` wildcard matching (e.g. `ticket_*`).

Example: my_dropdown

Outputs

Custom ID

The custom ID of the dropdown/select that was submitted.

Example: my_dropdown

Wildcard Value

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 (CSV)

Selected values joined by commas.

Example: option_a,option_b

Selected Values JSON

JSON array containing all selected values.

Example: ["option_a","option_b"]

Selected Value Count

Number of selected values.

Example: 2

Component Type

Type of select menu interaction (string_select, user_select, role_select, mentionable_select, channel_select).

Example: string_select

User ID

ID of the user who submitted the dropdown/select.

Example: 123456789012345678

Username

Username of the user who submitted the dropdown/select.

Example: johndoe

User Avatar URL

Avatar URL of the user who submitted the dropdown/select.

Example: https://cdn.discordapp.com/avatars/123/abc.png

Channel ID

Channel where the dropdown/select was submitted.

Example: 123456789012345678

Server ID

Server where the dropdown/select was submitted.

Example: 123456789012345678

Application ID

ID of the application that received this interaction.

Example: 123456789012345678

Interaction ID

Unique interaction ID for this dropdown/select submit.

Example: 123456789012345678

Interaction Token

Token for this interaction, useful for webhook follow-up/edit operations.

Example: aW50ZXJhY3Rpb25fdG9rZW4

App Permissions

Permissions the bot/application had in the interaction channel, as a Discord bitfield string.

Example: 274877990912

User Locale

Discord locale of the user who submitted the dropdown/select.

Example: en-US

Server Locale

Preferred locale of the server where the dropdown/select was submitted, when available.

Example: en-US

Interaction Context

Where the interaction was used (`server`, `bot_dm`, or `private_channel`).

Example: server

Message ID

ID of the message the dropdown/select is attached to.

Example: 123456789012345678

Build a bot using triggers like Dropdown Submit

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

ID: dropdown_submit
  • Interaction trigger: blocks that respond to interactions (replies, modals, ...) can be used in its flows.

Options

FieldInventScript nameValue
Custom IDcustom_ide.g. "my_dropdown"

Outputs

FieldInventScript nameValue
Custom IDcustom_ide.g. "my_dropdown"
Wildcard Valuewildcard_valuee.g. "123"
Selected Values (CSV)values_csve.g. "option_a,option_b"
Selected Values JSONvalues_jsone.g. "[\"option_a\",\"option_b\"]"
Selected Value Countvalue_counte.g. "2"
Component Typecomponent_typee.g. "string_select"
User IDuser_ide.g. "123456789012345678"
Usernameusernamee.g. "johndoe"
User Avatar URLuser_avatare.g. "https://cdn.discordapp.com/avatars/123/abc.png"
Channel IDchannel_ide.g. "123456789012345678"
Server IDserver_ide.g. "123456789012345678"
Application IDapplication_ide.g. "123456789012345678"
Interaction IDinteraction_ide.g. "123456789012345678"
Interaction Tokeninteraction_tokene.g. "aW50ZXJhY3Rpb25fdG9rZW4"
App Permissionsapp_permissionse.g. "274877990912"
User Localeuser_localee.g. "en-US"
Server Localeserver_localee.g. "en-US"
Interaction Contextinteraction_contexte.g. "server"
Message IDmessage_ide.g. "123456789012345678"

Example InventScript

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,
	})
}

More interactions triggers