User class

Constructors

User(Snowflake _id, String _username, String? _globalName, String? _discriminator, bool _bot, bool _system, List<UserFlagContract> _publicFlags, List<UserFlagContract> _flags, UserDecoration _decoration, String _lang, PremiumType premiumType)
User.from(dynamic payload)
factory

Properties

createdAt DateTime
Returns the creation date of the user as a DateTime.
no setter
decoration UserDecoration
Returns the decoration of the user as a UserDecoration.
no setter
discriminator String?
Returns the username of the user as a String.
no setter
flags List<UserFlagContract>
Returns a list of user flags as a list of UserFlagContract.
no setter
globalName String?
no setter
hashCode int
The hash code for this object.
no setterinherited
id Snowflake
Returns the unique identifier of the user as a Snowflake.
no setter
isBot bool
Returns a bool indicating whether the user is a bot.
no setter
isMigrated bool
Returns a bool indicating whether the user use the new Discord username system.
no setter
isSystem bool
Returns a bool indicating whether the user is a system user.
no setter
lang Locale
Returns the user's locale as a Locale enum value based on the value of language
no setter
premiumType PremiumType
getter/setter pair
publicFlags List<UserFlagContract>
Returns a list of public user flags as a list of UserFlagContract.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
Returns the user's tag as a String.
no setter
username String
Returns the username of the user as a String.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send({String? content, List<EmbedBuilder>? embeds, ComponentBuilder? components, List<AttachmentBuilder>? attachments, bool? tts}) Future<DmMessage?>
This function sends a DM message to the user that corresponds to the instance of the User.
toGuildMember(Snowflake guildId) GuildMember?
Return GuildMember of Guild context for this
toString() String
Returns a taggable String representation of the user.
override

Operators

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