Skip to content

ClientUser

ClientUser ⇐ User

Represents a client user, extending the base User class.

Kind: global class
Extends: User

new ClientUser([data], client)

Constructs a new instance of the class.

ParamTypeDescription
[data]ObjectThe initial data for the instance.
clientClientThe client object.

clientUser.setAvatar(avatar) ⇒ Promise

Sets the avatar for the user.

Kind: instance method of ClientUser
Returns: Promise - A promise that resolves when the avatar is successfully set.

ParamTypeDescription
avatarstringThe URL or file path of the new avatar image.

clientUser.setUsername(username) ⇒ Promise

Asynchronously sets the username for the current user.

Kind: instance method of ClientUser
Returns: Promise - A promise that resolves when the username is successfully set.

ParamTypeDescription
usernamestringThe new username to set.

clientUser.setAvatarDecorations(avatarDecorations) ⇒ Promise

Sets the avatar decorations for the user.

Kind: instance method of ClientUser
Returns: Promise - A promise that resolves when the avatar decorations are set.

ParamTypeDescription
avatarDecorationsObjectThe avatar decorations to set.

clientUser.setPresence(presence) ⇒ void

Sets the presence of the client.

Kind: instance method of ClientUser

ParamTypeDescription
presencePresenceThe presence object containing the desired presence information.

clientUser.setStatus(status) ⇒ void

Sets the status of the user.

Kind: instance method of ClientUser

ParamTypeDescription
statusstringThe status to set.

clientUser.setActivities(activities) ⇒ void

Sets the activities for the presence of the user.

Kind: instance method of ClientUser

ParamTypeDescription
activitiesArrayAn array of activity objects.