Class: MijDiscord::Events::DeleteMessage

Inherits:
Generic show all
Defined in:
lib/mij-discord/events/message.rb

Instance Attribute Summary collapse

Attributes inherited from Generic

#bot

Instance Method Summary collapse

Methods inherited from EventBase

delegate_method, filter_match, inherited, #inspect, #trigger?

Constructor Details

#initialize(bot, data) ⇒ DeleteMessage

Returns a new instance of DeleteMessage.



61
62
63
64
65
66
# File 'lib/mij-discord/events/message.rb', line 61

def initialize(bot, data)
  super(bot)

  @id = data['id'].to_i
  @channel = @bot.channel(data['channel_id'])
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



49
50
51
# File 'lib/mij-discord/events/message.rb', line 49

def channel
  @channel
end

#idObject (readonly)

Returns the value of attribute id.



47
48
49
# File 'lib/mij-discord/events/message.rb', line 47

def id
  @id
end