ClientUser class Null safety

ClientUser is bot's discord account. Allows to change bot's presence.

Inheritance

Properties

avatar String?
The user's avatar hash.
read / write, final, late, inherited
bot bool
Whether the user belongs to an OAuth2 application
read / write, final, late, inherited
client INyxx
Reference to client
final, inherited
createdAt DateTime
Gets creation timestamp included in Snowflake
read-only, inherited
discriminator int
The user's discriminator.
read / write, final, late, inherited
dmChannel FutureOr<DMChannel>
Gets the DMChannel for the user.
read-only, inherited
formattedDiscriminator String
Formatted discriminator with leading zeros if needed
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
id Snowflake
ID of entity as Snowflake
final, inherited
mention String
The string to mention the user.
read-only, inherited
mfa bool?
Weather or not the client user has MFA enabled.
read / write
nitroType NitroType?
Premium types denote the level of premium a user has.
read / write, inherited
presence Activity?
The member's presence.
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
status ClientStatus?
The member's status. offline, online, idle, or dnd.
read / write, inherited
system bool
Whether the user is an Official Discord System user (part of the urgent message system)
read / write, final, late, inherited
tag String
Returns String with username#discriminator
read-only, inherited
userFlags UserFlags?
Additional flags associated with user account. Describes if user has certain features like joined into one of houses or is discord employee.
read / write, inherited
username String
The user's username.
read / write, final, late, inherited
verified bool?
Weather or not the client user's account is verified.
read / write

Methods

avatarURL({String format = "webp", int size = 128}) String
The user's avatar, represented as URL. In case if user does not have avatar, default discord avatar will be returned with specified size and png format.
inherited
edit({String? username, File? avatarFile, List<int>? avatarBytes, String? encodedAvatar, String? encodedExtension}) Future<User>
Edits current user. This changes user's username - not per guild nickname.
getMembership() Map<Guild, Member>
Allows to get Member objects for all guilds for bot user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
sendMessage({dynamic content, List<AttachmentBuilder>? files, EmbedBuilder? embed, bool? tts, AllowedMentions? allowedMentions, MessageBuilder? builder, ReplyBuilder? replyBuilder}) Future<Message>
Sends a message to user.
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited