struct Discord::User
- Discord::User
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
discordcr/mappings/user.crConstructors
Instance Method Summary
- #avatar : String | Nil
- #avatar=(avatar : String | Nil)
-
#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 | Nil
- #bot=(bot : Bool | Nil)
- #discriminator : String
- #discriminator=(discriminator : String)
- #email : String | Nil
- #email=(email : String | Nil)
- #flags : UserFlags | Nil
- #flags=(flags : UserFlags | Nil)
- #id : Snowflake
- #id=(id : Snowflake)
- #member : PartialGuildMember | Nil
- #member=(member : PartialGuildMember | Nil)
-
#mention
Produces a string to mention this user in a message
- #mfa_enabled : Bool | Nil
- #mfa_enabled=(mfa_enabled : Bool | Nil)
- #system : Bool | Nil
- #system=(system : Bool | Nil)
- #username : String
- #username=(username : String)
- #verified : Bool | Nil
- #verified=(verified : Bool | Nil)
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.