Class: Discorb::Webhook::Message::Author
- Inherits:
 - 
      DiscordModel
      
        
- Object
 - DiscordModel
 - Discorb::Webhook::Message::Author
 
 
- Defined in:
 - lib/discorb/webhook.rb
 
Overview
Represents an author of webhook message.
Instance Attribute Summary collapse
- 
  
    
      #avatar -> Discorb::Asset 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The avatar of the author.
 - 
  
    
      #bot -> Boolean 
    
    
      (also: #bot?)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Whether the author is a bot.
 - 
  
    
      #discriminator -> String 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The discriminator of the author.
 - 
  
    
      #id -> Discorb::Snowflake 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The ID of the author.
 - 
  
    
      #username -> String 
    
    
      (also: #name)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The name of the author.
 
Instance Method Summary collapse
- 
  
    
      #to_s -> String 
    
    
      (also: #to_s_user)
    
  
  
  
  
  
  
  
  
  
    
Format author with
Name#Discriminatorstyle. 
Methods inherited from DiscordModel
Instance Attribute Details
#avatar -> Discorb::Asset (readonly)
Returns The avatar of the author.
      370 371 372  | 
    
      # File 'lib/discorb/webhook.rb', line 370 def avatar @avatar end  | 
  
#bot -> Boolean (readonly) Also known as: bot?
    Note:
    
  
This will be always true.
Returns Whether the author is a bot.
      362 363 364  | 
    
      # File 'lib/discorb/webhook.rb', line 362 def bot @bot end  | 
  
#discriminator -> String (readonly)
Returns The discriminator of the author.
      372 373 374  | 
    
      # File 'lib/discorb/webhook.rb', line 372 def discriminator @discriminator end  | 
  
#id -> Discorb::Snowflake (readonly)
Returns The ID of the author.
      365 366 367  | 
    
      # File 'lib/discorb/webhook.rb', line 365 def id @id end  | 
  
#username -> String (readonly) Also known as: name
Returns The name of the author.
      367 368 369  | 
    
      # File 'lib/discorb/webhook.rb', line 367 def username @username end  | 
  
Instance Method Details
#to_s -> String Also known as: to_s_user
Format author with Name#Discriminator style.
      389 390 391  | 
    
      # File 'lib/discorb/webhook.rb', line 389 def to_s "#{@username}##{@discriminator}" end  |