ClientUser class

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

Inheritance

Properties

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

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, AttachmentBuilder? avatarAttachment}) 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 nonexistent method or property is accessed.
inherited
sendMessage(MessageBuilder builder) 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