class Discorb::Gateway::ReactionRemoveAllEvent
Represents a `MESSAGE_REACTION_REMOVE_ALL` event.
Attributes
channel[R]
@macro client_cache @return [Discorb::Channel] The channel the message was sent in.
channel_id[R]
@return [Discorb::Snowflake] The ID of the channel the message was sent in.
guild[R]
@macro client_cache @return [Discorb::Guild] The guild the message was sent in.
guild_id[R]
@return [Discorb::Snowflake] The ID of the guild the message was sent in.
message[R]
@macro client_cache @return [Discorb::Message] The message the reaction was sent in.
message_id[R]
@return [Discorb::Snowflake] The ID of the message.
Public Class Methods
new(client, data)
click to toggle source
@!visibility private
# File lib/discorb/gateway.rb, line 124 def initialize(client, data) @client = client @data = data @guild_id = Snowflake.new(data[:guild_id]) @channel_id = Snowflake.new(data[:channel_id]) @message_id = Snowflake.new(data[:message_id]) @guild = client.guilds[data[:guild_id]] @channel = client.channels[data[:channel_id]] @message = client.messages[data[:message_id]] end
Public Instance Methods
fetch_message(force: false)
click to toggle source
Fetch the message. If message is cached, it will be returned. @macro async @macro http
@param [Boolean] force Whether to force fetching the message.
@return [Discorb::Message] The message.
# File lib/discorb/gateway.rb, line 143 def fetch_message(force: false) Async do next @message if !force && @message @message = @channel.fetch_message(@message_id).wait end end