Method: Discorb::SelectMenu::Option#initialize

Defined in:
lib/discorb/components/select_menu.rb

#initialize(label, value, description: nil, emoji: nil, default: false) ⇒ Option

Initialize a new option.

Parameters:

  • label (String)

    The label of the option.

  • value (String)

    The value of the option.

  • description (String) (defaults to: nil)

    The description of the option.

  • emoji (Discorb::Emoji) (defaults to: nil)

    The emoji of the option.

  • default (Boolean) (defaults to: false)

    Whether the option is default.



108
109
110
111
112
113
114
# File 'lib/discorb/components/select_menu.rb', line 108

def initialize(label, value, description: nil, emoji: nil, default: false)
  @label = label
  @value = value
  @description = description
  @emoji = emoji
  @default = default
end