Creates a new User instance.
The client instance.
The raw data for the user from the API.
Optional
avatar?: Optional
badges?: numberFormat: uint32
Bitfield of user badges
https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserBadges.html
Optional
bot?: null | { owner: string }Optional
display_name?: null | stringOptional
flags?: numberFormat: uint32
Enum of user flags
https://docs.rs/revolt-models/latest/revolt_models/v0/enum.UserFlags.html
Optional
privileged?: booleanOptional
relations?: {Optional
status?: The avatar of the user, or null
if none is set.
The badges associated with the user.
Whether the user is a bot.
Readonly
clientThe client instance.
The unique identifier for the object.
The presence status of the user.
The username of the user.
Gets the creation timestamp of the user in milliseconds.
The timestamp of when the user was created.
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optional
clear: string[]Fields to clear in the object.
A clone of the updated object.
Compares this object with another to determine if they are equal.
Optional
obj: null | UserThe object to compare with.
true
if the objects are equal, otherwise false
.
Converts the user to a string representation.
A string representation of the user in the format <@userId>
.
Represents a user in the client.