Class: Discorb::DiscordModel
  Abstract
  
  
  
  
    - Inherits:
 
    - 
      Object
      
        
          - Object
 
          
            - Discorb::DiscordModel
 
          
        
        show all
      
     
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/discorb/common.rb
 
  
  
 
Overview
  
    
Represents Discord model.
   
 
  
  Direct Known Subclasses
  Application, Application::Team, Application::Team::Member, Asset, Attachment, AuditLog, AuditLog::Entry, AuditLog::Entry::Change, AuditLog::Entry::Changes, AuditLog::Integration, Channel, Guild, Guild::Ban, Guild::VanityInvite, Guild::Widget, GuildTemplate, GuildTemplate::TemplateGuild, GuildTemplate::TemplateGuild::Channel, GuildTemplate::TemplateGuild::Role, Integration, Integration::Account, Interaction, Invite, Message, Message::Activity, Message::Interaction, PartialEmoji, Presence, Presence::Activity, Presence::Activity::Asset, Presence::Activity::Button, Presence::Activity::Party, Presence::Activity::Secrets, Presence::Activity::Timestamps, Presence::ClientStatus, Reaction, Role, Role::Tag, Snowflake, StageInstance, Sticker, Sticker::Pack, ThreadChannel::Member, User, VoiceRegion, VoiceState, Webhook::FollowerWebhook::Channel, Webhook::FollowerWebhook::Guild, Webhook::Message::Author, WelcomeScreen, WelcomeScreen::Channel
 
  
    
      Instance Method Summary
      collapse
    
    
  
  
    Instance Method Details
    
      
  
  
    #==(other) -> Object 
  
  
  
  
    
      
20
21
22
23
24
25
26 
     | 
    
      # File 'lib/discorb/common.rb', line 20
def ==(other)
  if respond_to?(:id) && other.respond_to?(:id)
    id == other.id
  else
    super
  end
end
     | 
  
 
    
      
  
  
    #eql?(other) -> Boolean 
  
  
  
  
    
      
16
17
18 
     | 
    
      # File 'lib/discorb/common.rb', line 16
def eql?(other)
  self == other
end 
     | 
  
 
    
      
  
  
    #hash -> Object 
  
  
  
  
    
      
33
34
35 
     | 
    
      # File 'lib/discorb/common.rb', line 33
def hash
  @id.hash
end 
     |