Class: Discordrb::Events::ComponentEvent

Inherits:
InteractionCreateEvent show all
Defined in:
lib/discordrb/events/interactions.rb

Overview

An event for when a user interacts with a component.

Direct Known Subclasses

ButtonEvent, SelectMenuEvent

Instance Attribute Summary collapse

Attributes inherited from InteractionCreateEvent

#channel, #channel_id, #interaction, #server, #server_id, #type, #user

Attributes inherited from Event

#bot

Method Summary

Methods inherited from InteractionCreateEvent

#defer, #defer_update, #delete_message, #delete_response, #edit_message, #edit_response, #respond, #send_message, #update_message

Instance Attribute Details

#custom_idString (readonly)

Returns User provided data for this button.

Returns:

  • (String)

    User provided data for this button.



315
316
317
# File 'lib/discordrb/events/interactions.rb', line 315

def custom_id
  @custom_id
end

#messageInteractions::Message (readonly)

Returns The message the button originates from.

Returns:



318
319
320
# File 'lib/discordrb/events/interactions.rb', line 318

def message
  @message
end