DiscordProfile class

Discord user profile returned by the userinfo endpoint.

See Discord User Object.

Constructors

DiscordProfile({required String id, required String username, String? discriminator, String? globalName, String? avatar, bool? bot, bool? system, bool? mfaEnabled, String? banner, int? accentColor, String? locale, bool? verified, String? email, int? flags, int? premiumType, int? publicFlags})
Creates a new DiscordProfile with the given fields.
const
DiscordProfile.fromJson(Map<String, dynamic> json)
Creates a DiscordProfile from a JSON map returned by the Discord API.
factory

Properties

accentColor int?
The user's banner color.
final
avatar String?
The user's avatar hash.
final
avatarUrl String?
Returns the URL for the user's avatar.
no setter
The user's banner hash.
final
bot bool?
Whether the user belongs to an OAuth2 application.
final
discriminator String?
The user's Discord-tag (deprecated, will be "0" for new usernames).
final
email String?
The user's email.
final
flags int?
The flags on a user's account.
final
globalName String?
The user's display name, if set.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The user's id.
final
locale String?
The user's chosen language option.
final
mfaEnabled bool?
Whether the user has two factor enabled on their account.
final
premiumType int?
The type of Nitro subscription.
final
publicFlags int?
The public flags on a user's account.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
system bool?
Whether the user is an Official Discord System user.
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this profile to a JSON-serializable map.
toString() String
A string representation of this object.
inherited

Operators

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