Class: Rubycord::Events::ThreadCreateEvent
- Defined in:
- lib/rubycord/events/threads.rb
Overview
Raised when a thread is created
Direct Known Subclasses
Instance Attribute Summary collapse
-
#thread ⇒ Channel
readonly
The thread in question.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ ThreadCreateEvent
constructor
A new instance of ThreadCreateEvent.
Constructor Details
#initialize(data, bot) ⇒ ThreadCreateEvent
Returns a new instance of ThreadCreateEvent.
9 10 11 12 |
# File 'lib/rubycord/events/threads.rb', line 9 def initialize(data, bot) @bot = bot @thread = data.is_a?(Rubycord::Channel) ? data : bot.channel(data["id"].to_i) end |
Instance Attribute Details
#thread ⇒ Channel (readonly)
Returns the thread in question.
5 6 7 |
# File 'lib/rubycord/events/threads.rb', line 5 def thread @thread end |