Class: Discordrb::Events::RawEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discordrb/events/raw.rb

Overview

Event raised when any dispatch is received

Direct Known Subclasses

UnknownEvent

Instance Attribute Summary collapse

Attributes inherited from Event

#bot

Instance Method Summary collapse

Constructor Details

#initialize(type, data, bot) ⇒ RawEvent

Returns a new instance of RawEvent.



17
18
19
20
21
# File 'lib/discordrb/events/raw.rb', line 17

def initialize(type, data, bot)
  @type = type
  @data = data
  @bot = bot
end

Instance Attribute Details

#dataHash (readonly) Also known as: d

Returns the data of this dispatch.

Returns:

  • (Hash)

    the data of this dispatch.



14
15
16
# File 'lib/discordrb/events/raw.rb', line 14

def data
  @data
end

#typeSymbol (readonly) Also known as: t

Returns the type of this dispatch.

Returns:

  • (Symbol)

    the type of this dispatch.



10
11
12
# File 'lib/discordrb/events/raw.rb', line 10

def type
  @type
end