Class: Rubycord::Events::RawEvent
- Defined in:
- lib/rubycord/events/raw.rb
Overview
Event raised when any dispatch is received
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Hash
(also: #d)
readonly
The data of this dispatch.
-
#type ⇒ Symbol
(also: #t)
readonly
The type of this dispatch.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(type, data, bot) ⇒ RawEvent
constructor
A new instance of RawEvent.
Constructor Details
#initialize(type, data, bot) ⇒ RawEvent
Returns a new instance of RawEvent.
15 16 17 18 19 |
# File 'lib/rubycord/events/raw.rb', line 15 def initialize(type, data, bot) @type = type @data = data @bot = bot end |
Instance Attribute Details
#data ⇒ Hash (readonly) Also known as: d
Returns the data of this dispatch.
12 13 14 |
# File 'lib/rubycord/events/raw.rb', line 12 def data @data end |
#type ⇒ Symbol (readonly) Also known as: t
Returns the type of this dispatch.
8 9 10 |
# File 'lib/rubycord/events/raw.rb', line 8 def type @type end |