Class: Discordrb::Events::ThreadCreateEvent
- Defined in:
- lib/discordrb/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.
| 11 12 13 14 | # File 'lib/discordrb/events/threads.rb', line 11 def initialize(data, bot) @bot = bot @thread = data.is_a?(Discordrb::Channel) ? data : bot.channel(data['id'].to_i) end | 
Instance Attribute Details
#thread ⇒ Channel (readonly)
Returns the thread in question.
| 7 8 9 | # File 'lib/discordrb/events/threads.rb', line 7 def thread @thread end |