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

Select Menu

Summary

Functions

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

Types

@type opts() :: [opt()]
@type t() :: %Nostrum.Struct.Component{
  channel_types: term(),
  components: term(),
  custom_id: Nostrum.Struct.Component.custom_id(),
  default_values: term(),
  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()
}

Functions

Link to this function

flatten(map)

View Source (since 0.5.0)
Link to this function

select_menu(custom_id, opts \\ [])

View Source (since 0.5.0)

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