Class: Discorb::MessageComponentInteraction::SelectMenu

Inherits:
Discorb::MessageComponentInteraction show all
Defined in:
lib/discorb/interaction/components.rb

Overview

Represents a select menu interaction.

Instance Attribute Summary collapse

Attributes inherited from Discorb::MessageComponentInteraction

#message

Attributes inherited from Interaction

#app_permissions, #application_id, #guild_locale, #id, #locale, #token, #type, #user, #version

Method Summary

Methods included from Interaction::ModalResponder

#show_modal

Methods included from Interaction::UpdateResponder

#defer_update, #edit

Methods included from Interaction::SourceResponder

#defer_source, #post

Methods inherited from Interaction

#channel, #delete_original_message, #edit_original_message, #guild, #inspect, #post

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Attribute Details

#custom_id -> String (readonly)

Returns The custom id of the select menu.

Returns:

  • (String)

    The custom id of the select menu.



95
96
97
# File 'lib/discorb/interaction/components.rb', line 95

def custom_id
  @custom_id
end

#value -> Object (readonly)



102
103
104
# File 'lib/discorb/interaction/components.rb', line 102

def value
  @values[0]
end

#values -> Array<String> (readonly)

Returns The selected options.

Returns:

  • (Array<String>)

    The selected options.



97
98
99
# File 'lib/discorb/interaction/components.rb', line 97

def values
  @values
end