class Discordrb::Events::ComponentEvent

An event for when a user interacts with a component.

Attributes

custom_id[R]

@return [String] User provided data for this button.

message[R]

@return [Interactions::Message, nil] The message the button originates from.

Public Class Methods

new(data, bot) click to toggle source

@!visibility private

# File lib/discordrb/events/interactions.rb, line 335
def initialize(data, bot)
  super

  @message = Discordrb::Interactions::Message.new(data['message'], bot, @interaction) if data['message']
  @custom_id = data['data']['custom_id']
end