struct Discord::User

Defined in:

discordcr/mappings/user.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(__temp_268 : JSON::PullParser) #

Instance Method Detail

def avatar : ::Union(String, Nil) #

def avatar=(_avatar : ::Union(String, Nil)) #

def avatar_url(format : CDN::UserAvatarFormat, size : Int32 = 128) #

Produces a CDN URL to this user's avatar, in the given format and size. If the user has no avatar, a default avatar URL is returned.


[View source]
def avatar_url(size : Int32 = 128) #

Produces a CDN URL to this user's avatar in the given size. If the user has an avatar a WebP will be returned, or a GIF if the avatar is animated. If the user has no avatar, a default avatar URL is returned.


[View source]
def bot : ::Union(Bool, Nil) #

def bot=(_bot : ::Union(Bool, Nil)) #

def discriminator : String #

def discriminator=(_discriminator : String) #

def email : ::Union(String, Nil) #

def email=(_email : ::Union(String, Nil)) #

def id : Snowflake #

def id=(_id : Snowflake) #

def member : ::Union(PartialGuildMember, Nil) #

def member=(_member : ::Union(PartialGuildMember, Nil)) #

def mention #

Produces a string to mention this user in a message


[View source]
def mfa_enabled : ::Union(Bool, Nil) #

def mfa_enabled=(_mfa_enabled : ::Union(Bool, Nil)) #

def to_json(json : JSON::Builder) #

def username : String #

def username=(_username : String) #

def verified : ::Union(Bool, Nil) #

def verified=(_verified : ::Union(Bool, Nil)) #