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.



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

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

Instance Method Details

#afterObject



307
308
309
# File 'lib/discord_rda/event/base.rb', line 307

def after
  channel
end

#beforeObject



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

def before
  @data['before']
end

#channelObject



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

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