struct Discord::User

Included Modules

Defined in:

discordcr/mappings/user.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def avatar : String | Nil #

[View source]
def avatar=(avatar : String | Nil) #

[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 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 bot : Bool | Nil #

[View source]
def bot=(bot : Bool | Nil) #

[View source]
def discriminator : String #

[View source]
def discriminator=(discriminator : String) #

[View source]
def email : String | Nil #

[View source]
def email=(email : String | Nil) #

[View source]
def flags : UserFlags | Nil #

[View source]
def flags=(flags : UserFlags | Nil) #

[View source]
def id : Snowflake #

[View source]
def id=(id : Snowflake) #

[View source]
def member : PartialGuildMember | Nil #

[View source]
def member=(member : PartialGuildMember | Nil) #

[View source]
def mention #

Produces a string to mention this user in a message


[View source]
def mfa_enabled : Bool | Nil #

[View source]
def mfa_enabled=(mfa_enabled : Bool | Nil) #

[View source]
def system : Bool | Nil #

[View source]
def system=(system : Bool | Nil) #

[View source]
def username : String #

[View source]
def username=(username : String) #

[View source]
def verified : Bool | Nil #

[View source]
def verified=(verified : Bool | Nil) #

[View source]