Class: OnyxCord::Components::SelectMenu

Inherits:
Object
  • Object
show all
Defined in:
lib/onyxcord/models/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.



189
190
191
# File 'lib/onyxcord/models/component.rb', line 189

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.



183
184
185
# File 'lib/onyxcord/models/component.rb', line 183

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.



192
193
194
# File 'lib/onyxcord/models/component.rb', line 192

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.



195
196
197
# File 'lib/onyxcord/models/component.rb', line 195

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.



201
202
203
# File 'lib/onyxcord/models/component.rb', line 201

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.



198
199
200
# File 'lib/onyxcord/models/component.rb', line 198

def placeholder
  @placeholder
end

#valuesArray<String> (readonly)

Returns the submitted values from the modal.

Returns:

  • (Array<String>)

    the submitted values from the modal.



186
187
188
# File 'lib/onyxcord/models/component.rb', line 186

def values
  @values
end