struct

Discord::User

Inherits JSON::Serializable / Struct / Value / Object

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

avatar
Source
avatar=(avatar : String | Nil)
Source
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.

Source
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.

Source
bot=(bot : Bool | Nil)
Source
discriminator
Source
discriminator=(discriminator : String)
Source
email
Source
email=(email : String | Nil)
Source
flags
Source
flags=(flags : UserFlags | Nil)
Source
id=(id : Snowflake)
Source
member
Source
member=(member : PartialGuildMember | Nil)
Source
mention

Produces a string to mention this user in a message

Source
mfa_enabled
Source
mfa_enabled=(mfa_enabled : Bool | Nil)
Source
system
Source
system=(system : Bool | Nil)
Source
username
Source
username=(username : String)
Source
verified
Source
verified=(verified : Bool | Nil)
Source