Class: Discorb::MessageComponentInteraction::SelectMenu

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

Overview

Represents a select menu interaction.

Instance Attribute Summary collapse

Attributes inherited from Interaction

#application_id, #id, #member, #token, #type, #user, #version

Method Summary

Methods included from Interaction::UpdateResponse

#defer_update, #edit

Methods included from Interaction::SourceResponse

#defer_source, #post

Methods inherited from Interaction

#channel, #guild, #inspect, #target

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#custom_id -> String (readonly)

Returns The custom id of the select menu.

Returns:

  • (String)

    The custom id of the select menu.



513
514
515
# File 'lib/discorb/interaction.rb', line 513

def custom_id
  @custom_id
end

#value -> Object (readonly)



520
521
522
# File 'lib/discorb/interaction.rb', line 520

def value
  @values[0]
end

#values -> Array<String> (readonly)

Returns The selected options.

Returns:

  • (Array<String>)

    The selected options.



515
516
517
# File 'lib/discorb/interaction.rb', line 515

def values
  @values
end