Class: DiscordRDA::ChannelCreateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discord_rda/event/base.rb

Overview

Channel events

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

#initialize(data, shard_id:) ⇒ ChannelCreateEvent

Returns a new instance of ChannelCreateEvent.



280
281
282
# File 'lib/discord_rda/event/base.rb', line 280

def initialize(data, shard_id:)
  super('CHANNEL_CREATE', data, shard_id: shard_id)
end

Instance Method Details

#channelObject



284
285
286
# File 'lib/discord_rda/event/base.rb', line 284

def channel
  @channel ||= Channel.new(@data)
end