Class: Discorb::Gateway::ReactionRemoveEmojiEvent
- Inherits:
 - 
      GatewayEvent
      
        
- Object
 - GatewayEvent
 - Discorb::Gateway::ReactionRemoveEmojiEvent
 
 
- Defined in:
 - lib/discorb/gateway.rb
 
Overview
Represents a MESSAGE_REACTION_REMOVE_EMOJI event.
Instance Attribute Summary collapse
- #channel -> nil, Discorb::Channel readonly
 - 
  
    
      #channel_id -> Discorb::Snowflake 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The ID of the channel the message was sent in.
 - 
  
    
      #emoji -> Discorb::UnicodeEmoji, Discorb::PartialEmoji 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The emoji that was reacted with.
 - #guild -> nil, Discorb::Guild readonly
 - 
  
    
      #guild_id -> Discorb::Snowflake 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The ID of the guild the message was sent in.
 - #message -> nil, Discorb::Message readonly
 - 
  
    
      #message_id -> Discorb::Snowflake 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The ID of the message.
 
Instance Method Summary collapse
- 
  
    
      #fetch_message(force: false) -> Async::Task<Discorb::Message> 
    
    
  
  
  
  
  
  
  
  
  
    
Fetch the message.
 
Instance Attribute Details
#channel -> nil, Discorb::Channel (readonly)
This method returns an object from client cache. it will return nil if the object is not in cache.
      174 175 176  | 
    
      # File 'lib/discorb/gateway.rb', line 174 def channel @channel end  | 
  
#channel_id -> Discorb::Snowflake (readonly)
Returns The ID of the channel the message was sent in.
      167 168 169  | 
    
      # File 'lib/discorb/gateway.rb', line 167 def channel_id @channel_id end  | 
  
#emoji -> Discorb::UnicodeEmoji, Discorb::PartialEmoji (readonly)
Returns The emoji that was reacted with.
      182 183 184  | 
    
      # File 'lib/discorb/gateway.rb', line 182 def emoji @emoji end  | 
  
#guild -> nil, Discorb::Guild (readonly)
This method returns an object from client cache. it will return nil if the object is not in cache.
      177 178 179  | 
    
      # File 'lib/discorb/gateway.rb', line 177 def guild @guild end  | 
  
#guild_id -> Discorb::Snowflake (readonly)
Returns The ID of the guild the message was sent in.
      171 172 173  | 
    
      # File 'lib/discorb/gateway.rb', line 171 def guild_id @guild_id end  | 
  
#message -> nil, Discorb::Message (readonly)
This method returns an object from client cache. it will return nil if the object is not in cache.
      180 181 182  | 
    
      # File 'lib/discorb/gateway.rb', line 180 def @message end  | 
  
#message_id -> Discorb::Snowflake (readonly)
Returns The ID of the message.
      169 170 171  | 
    
      # File 'lib/discorb/gateway.rb', line 169 def @message_id end  | 
  
Instance Method Details
#fetch_message(force: false) -> Async::Task<Discorb::Message>
This is an asynchronous method, it will return a Async::Task object. Use Async::Task#wait to get the result.
This method calls HTTP request.
Fetch the message. If message is cached, it will be returned.
      205 206 207 208 209 210 211  | 
    
      # File 'lib/discorb/gateway.rb', line 205 def (force: false) Async do next @message if !force && @message @message = @channel.(@message_id).wait end end  |