Class: Discordrb::Components::SelectMenu

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data/component.rb

Overview

An interactable select menu component.

Defined Under Namespace

Classes: Option

Instance Attribute Summary collapse

Instance Attribute Details

#custom_idString (readonly)

Returns the custom ID used to identify the select menu.

Returns:

  • (String)

    the custom ID used to identify the select menu.



183
184
185
# File 'lib/discordrb/data/component.rb', line 183

def custom_id
  @custom_id
end

#idInteger (readonly)

Returns the numeric identifier of the select menu.

Returns:

  • (Integer)

    the numeric identifier of the select menu.



177
178
179
# File 'lib/discordrb/data/component.rb', line 177

def id
  @id
end

#max_valuesInteger? (readonly)

Returns the minimum amount of values that be selected.

Returns:

  • (Integer, nil)

    the minimum amount of values that be selected.



186
187
188
# File 'lib/discordrb/data/component.rb', line 186

def max_values
  @max_values
end

#min_valuesInteger? (readonly)

Returns the maximum amount of values that can be selected.

Returns:

  • (Integer, nil)

    the maximum amount of values that can be selected.



189
190
191
# File 'lib/discordrb/data/component.rb', line 189

def min_values
  @min_values
end

#optionsArray<Option> (readonly)

Returns the options in the select menu, or the selected options.

Returns:

  • (Array<Option>)

    the options in the select menu, or the selected options.



195
196
197
# File 'lib/discordrb/data/component.rb', line 195

def options
  @options
end

#placeholderString? (readonly)

Returns the default placeholder text shown on the select menu.

Returns:

  • (String, nil)

    the default placeholder text shown on the select menu.



192
193
194
# File 'lib/discordrb/data/component.rb', line 192

def placeholder
  @placeholder
end

#valuesArray<String> (readonly)

Returns the submitted values from the modal.

Returns:

  • (Array<String>)

    the submitted values from the modal.



180
181
182
# File 'lib/discordrb/data/component.rb', line 180

def values
  @values
end