Class: Discorb::Gateway::ReactionRemoveAllEvent
- Inherits:
 - 
      GatewayEvent
      
        
- Object
 - GatewayEvent
 - Discorb::Gateway::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) -> 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.
      125 126 127  | 
    
      # File 'lib/discorb/gateway.rb', line 125 def channel @channel end  | 
  
#channel_id -> Discorb::Snowflake (readonly)
Returns The ID of the channel the message was sent in.
      118 119 120  | 
    
      # File 'lib/discorb/gateway.rb', line 118 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.
      128 129 130  | 
    
      # File 'lib/discorb/gateway.rb', line 128 def guild @guild end  | 
  
#guild_id -> Discorb::Snowflake (readonly)
Returns The ID of the guild the message was sent in.
      122 123 124  | 
    
      # File 'lib/discorb/gateway.rb', line 122 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.
      131 132 133  | 
    
      # File 'lib/discorb/gateway.rb', line 131 def @message end  | 
  
#message_id -> Discorb::Snowflake (readonly)
Returns The ID of the message.
      120 121 122  | 
    
      # File 'lib/discorb/gateway.rb', line 120 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.
      153 154 155 156 157 158 159  | 
    
      # File 'lib/discorb/gateway.rb', line 153 def (force: false) Async do next @message if !force && @message @message = @channel.(@message_id).wait end end  |