View Source Nostrum.Struct.Component.SelectMenu (Nostrum v0.6.1)

Select Menu

Link to this section Summary

Functions

Creates a select menu that can be used inside an action row.

Link to this section Types

Specs

Specs

opts() :: [opt()]

Specs

t() :: %Nostrum.Struct.Component{
  components: term(),
  custom_id: Nostrum.Struct.Component.custom_id(),
  disabled: Nostrum.Struct.Component.disabled(),
  emoji: term(),
  label: term(),
  max_length: term(),
  max_values: Nostrum.Struct.Component.max_values(),
  min_length: term(),
  min_values: Nostrum.Struct.Component.min_values(),
  options: Nostrum.Struct.Component.options(),
  placeholder: Nostrum.Struct.Component.placeholder(),
  required: term(),
  style: term(),
  type: Nostrum.Struct.Component.type(),
  url: term(),
  value: term()
}

Link to this section Functions

Link to this function

select_menu(custom_id, opts \\ [])

View Source

Creates a select menu that can be used inside an action row.

Options can be passed as a keyword list.

Parameters

  • custom_id - lower case string, used for matching against when your application receives an interaction.

Options

  • disabled - If the select should be disabled
  • options - A list of options for the select menu, see Nostrum.Struct.Component.Option
  • placeholder - Value to be shown before anything is selected
  • min_values - minimum number of values the user must select, between 0 and 25, default is 1
  • max_values - maximum number of values the user must select, between 0 and 25, default is 1