Class: Discorb::GatewayHandler::ReactionRemoveAllEvent
- Inherits:
 - 
      GatewayEvent
      
        
- Object
 - GatewayEvent
 - Discorb::GatewayHandler::ReactionRemoveAllEvent
 
 
- Defined in:
 - lib/discorb/gateway.rb
 
Overview
Represents a MESSAGE_REACTION_REMOVE_ALL 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.
 - #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) -> 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.
      112 113 114  | 
    
      # File 'lib/discorb/gateway.rb', line 112 def channel @channel end  | 
  
#channel_id -> Discorb::Snowflake (readonly)
Returns The ID of the channel the message was sent in.
      105 106 107  | 
    
      # File 'lib/discorb/gateway.rb', line 105 def channel_id @channel_id 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.
      115 116 117  | 
    
      # File 'lib/discorb/gateway.rb', line 115 def guild @guild end  | 
  
#guild_id -> Discorb::Snowflake (readonly)
Returns The ID of the guild the message was sent in.
      109 110 111  | 
    
      # File 'lib/discorb/gateway.rb', line 109 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.
      118 119 120  | 
    
      # File 'lib/discorb/gateway.rb', line 118 def @message end  | 
  
#message_id -> Discorb::Snowflake (readonly)
Returns The ID of the message.
      107 108 109  | 
    
      # File 'lib/discorb/gateway.rb', line 107 def @message_id end  | 
  
Instance Method Details
#fetch_message(force: false) -> 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.
      140 141 142 143 144 145 146  | 
    
      # File 'lib/discorb/gateway.rb', line 140 def (force: false) Async do |_task| next @message if !force && @message @message = @channel.(@message_id).wait end end  |