Class: Discordrb::Events::ReactionRemoveAllEvent
- Includes:
- Respondable
- Defined in:
- lib/discordrb/events/reactions.rb
Overview
Event raised when somebody removes all reactions from a message
Instance Attribute Summary
Attributes inherited from Event
Instance Method Summary collapse
-
#channel ⇒ Channel
The channel where the removal occurred.
-
#initialize(data, bot) ⇒ ReactionRemoveAllEvent
constructor
A new instance of ReactionRemoveAllEvent.
-
#message ⇒ Message
The message all reactions were removed from.
Methods included from Respondable
#<<, #drain, #drain_into, #send_embed, #send_message, #send_temporary_message
Constructor Details
#initialize(data, bot) ⇒ ReactionRemoveAllEvent
Returns a new instance of ReactionRemoveAllEvent.
116 117 118 119 120 121 |
# File 'lib/discordrb/events/reactions.rb', line 116 def initialize(data, bot) @bot = bot @message_id = data['message_id'].to_i @channel_id = data['channel_id'].to_i end |
Instance Method Details
#channel ⇒ Channel
Returns the channel where the removal occurred.
124 125 126 |
# File 'lib/discordrb/events/reactions.rb', line 124 def channel @channel ||= @bot.channel(@channel_id) end |
#message ⇒ Message
Returns the message all reactions were removed from.
129 130 131 |
# File 'lib/discordrb/events/reactions.rb', line 129 def @message ||= channel.(@message_id) end |