Class: DiscordRDA::ChannelUpdateEvent

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

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:) ⇒ ChannelUpdateEvent

Returns a new instance of ChannelUpdateEvent.



290
291
292
# File 'lib/discord_rda/event/base.rb', line 290

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

Instance Method Details

#afterObject



302
303
304
# File 'lib/discord_rda/event/base.rb', line 302

def after
  channel
end

#beforeObject



298
299
300
# File 'lib/discord_rda/event/base.rb', line 298

def before
  @data['before']
end

#channelObject



294
295
296
# File 'lib/discord_rda/event/base.rb', line 294

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