struct Discord::User
- Discord::User
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
discordcr/mappings/user.crConstructors
Instance Method Summary
- #avatar : String?
- #avatar=(avatar : String?)
-
#avatar_url(size : Int32 = 128)
Produces a CDN URL to this user's avatar in the given
size
. -
#avatar_url(format : CDN::UserAvatarFormat, size : Int32 = 128)
Produces a CDN URL to this user's avatar, in the given
format
andsize
. - #bot : Bool?
- #bot=(bot : Bool?)
- #discriminator : String
- #discriminator=(discriminator : String)
- #email : String?
- #email=(email : String?)
- #flags : UserFlags?
- #flags=(flags : UserFlags?)
- #id : Snowflake
- #id=(id : Snowflake)
- #member : PartialGuildMember?
- #member=(member : PartialGuildMember?)
-
#mention
Produces a string to mention this user in a message
- #mfa_enabled : Bool?
- #mfa_enabled=(mfa_enabled : Bool?)
- #system : Bool?
- #system=(system : Bool?)
- #username : String
- #username=(username : String)
- #verified : Bool?
- #verified=(verified : Bool?)
Constructor Detail
Instance Method Detail
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.
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.