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.
845
846
847
|
# File 'lib/discord_rda/event/base.rb', line 845
def initialize(data, shard_id:)
super('THREAD_CREATE', data, shard_id: shard_id)
end
|
Instance Method Details
#creator_id ⇒ Object
865
866
867
|
# File 'lib/discord_rda/event/base.rb', line 865
def creator_id
@data['owner_id']
end
|
#guild_id ⇒ Object
857
858
859
|
# File 'lib/discord_rda/event/base.rb', line 857
def guild_id
@data['guild_id']
end
|
#newly_created? ⇒ Boolean
853
854
855
|
# File 'lib/discord_rda/event/base.rb', line 853
def newly_created?
@data['newly_created'] || false
end
|
#parent_id ⇒ Object
861
862
863
|
# File 'lib/discord_rda/event/base.rb', line 861
def parent_id
@data['parent_id']
end
|
#thread ⇒ Object
849
850
851
|
# File 'lib/discord_rda/event/base.rb', line 849
def thread
@thread ||= Channel.new(@data)
end
|