Skip to content

ClientUser

Represents a client user, extending the base User class.

Kind: global class
Extends: User

Constructs a new instance of the class.

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

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

Section titled “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

Section titled “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.

Sets the presence of the client.

Kind: instance method of ClientUser

ParamTypeDescription
presencePresenceThe presence object containing the desired presence information.

Sets the status of the user.

Kind: instance method of ClientUser

ParamTypeDescription
statusstringThe status to set.

clientUser.setActivities(activities) ⇒ void

Section titled “clientUser.setActivities(activities) ⇒ void”

Sets the activities for the presence of the user.

Kind: instance method of ClientUser

ParamTypeDescription
activitiesArrayAn array of activity objects.