DiscordUser class

Constructors

DiscordUser({required DiscordSnowflake id, required String username, required String discriminator, String? avatar, bool? bot, bool? system, bool? mfaEnabled, String? banner, int? accentColor, String? locale, bool? verified, String? email, int? flags, int? premiumType, int? publicFlags, DiscordGuildMember? member})
DiscordUser.fromJson(Map<String, dynamic> json)
factory

Properties

accentColor int?
the user's banner color encoded as an integer representation of hexadecimal color code
final
avatar String?
the user's avatar hash
final
the user's banner hash
final
bot bool?
whether the user belongs to an OAuth2 application
final
discriminator String
the user's 4-digit discord-tag
final
email String?
the user's email
final
flags int?
the flags on a user's account
final
hashCode int
The hash code for this object.
no setterinherited
id DiscordSnowflake
the user's id
final
locale String?
the user's chosen language option
final
member DiscordGuildMember?
Isn't technically part of the object as per its definition. Some endpoints add it nonetheless.
final
mfaEnabled bool?
whether the user has two factor enabled on their account
final
premiumType int?
the type of Nitro subscription on a user's account
final
premiumTypeAsEnum DiscordPremiumType
no setter
publicFlags int?
the public flags on a user's account
final
publicFlagsAsEnum List<DiscordUserFlag>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
system bool?
whether the user is an Official Discord System user (part of the urgent system message)
final
username String
the user's username, not unique across the platform
final
verified bool?
whether the email on this account has been verified
final

Methods

copyWith({DiscordSnowflake? id, String? username, String? discriminator, String? avatar, bool? bot, bool? system, bool? mfaEnabled, String? banner, int? accentColor, String? locale, bool? verified, String? email, int? flags, int? premiumType, int? publicFlags, DiscordGuildMember? member}) DiscordUser
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

Constants

accentColorEntry → const String
avatarEntry → const String
bannerEntry → const String
botEntry → const String
discriminatorEntry → const String
emailEntry → const String
flagsEntry → const String
idEntry → const String
localeEntry → const String
memberEntry → const String
mfaEnabledEntry → const String
premiumTypeEntry → const String
publicFlagsEntry → const String
systemEntry → const String
usernameEntry → const String
verifiedEntry → const String