User class

A single user, outside of a Guild's context.

Users can be actual users, bots or teams. See isBot and UserFlags.isTeamUser to check for the latter two.

External references:

Inheritance
Implemented types

Properties

accentColor DiscordColor?
The user's accent color, if they have an accent color.
final
avatar CdnAsset
The avatar of this entity.
no setteroverride
avatarDecoration CdnAsset?
no setter
avatarDecorationHash String?
The hash of this user's avatar decoration.
final
avatarHash String?
The user's avatar hash, if they have an avatar.
final
This user's banner.
no setter
bannerHash String?
The user's banner hash, if they have a banner.
final
defaultAvatar CdnAsset
This user's default avatar.
no setter
discriminator String
The user's discriminator.
final
flags UserFlags?
The UserFlags on the user's account.
final
globalName String?
The user's global display name, if it is set.
final
hashCode int
The hash code for this object.
no setterinherited
hasMfaEnabled bool
Whether the user has two factor authentication enabled.
final
id Snowflake
The id of this entity.
finalinherited
isBot bool
Whether the user is a bot.
final
isSystem bool
Whether the user is a system user.
final
locale Locale?
The user's locale, if they have a locale.
final
manager UserManager
The manager for this entity.
finalinherited
nitroType NitroType
The NitroType on the user's account.
final
publicFlags UserFlags?
The public UserFlags on the user's account.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String
The user's username.
final

Methods

defaultToString() String
Same as toString, but only called when dart:mirrors is not available.
inherited
fetch() Future<User>
Fetch this entity from the API.
inherited
get() Future<User>
If this entity exists in the manager's cache, return the cached instance. Otherwise, fetch this entity and return it.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited