Class: DiscordRDA::ThreadCreateEvent
- Inherits:
-
Event
- Object
- Event
- DiscordRDA::ThreadCreateEvent
show all
- Defined in:
- lib/discord_rda/event/base.rb
Overview
Instance Attribute Summary
Attributes inherited from Event
#data, #shard_id, #timestamp, #type
Instance Method Summary
collapse
Methods inherited from Event
#created_at, #inspect, #to_h
Constructor Details
Returns a new instance of ThreadCreateEvent.
840
841
842
|
# File 'lib/discord_rda/event/base.rb', line 840
def initialize(data, shard_id:)
super('THREAD_CREATE', data, shard_id: shard_id)
end
|
Instance Method Details
#creator_id ⇒ Object
860
861
862
|
# File 'lib/discord_rda/event/base.rb', line 860
def creator_id
@data['owner_id']
end
|
#guild_id ⇒ Object
852
853
854
|
# File 'lib/discord_rda/event/base.rb', line 852
def guild_id
@data['guild_id']
end
|
#newly_created? ⇒ Boolean
848
849
850
|
# File 'lib/discord_rda/event/base.rb', line 848
def newly_created?
@data['newly_created'] || false
end
|
#parent_id ⇒ Object
856
857
858
|
# File 'lib/discord_rda/event/base.rb', line 856
def parent_id
@data['parent_id']
end
|
#thread ⇒ Object
844
845
846
|
# File 'lib/discord_rda/event/base.rb', line 844
def thread
@thread ||= Channel.new(@data)
end
|