ClientUser
ClientUser ⇐ User
Section titled “ClientUser ⇐ User”Represents a client user, extending the base User class.
Kind: global class
Extends: User
- ClientUser ⇐
User- new ClientUser([data], client)
- .setAvatar(avatar) ⇒
Promise - .setUsername(username) ⇒
Promise - .setAvatarDecorations(avatarDecorations) ⇒
Promise - .setPresence(presence) ⇒
void - .setStatus(status) ⇒
void - .setActivities(activities) ⇒
void
new ClientUser([data], client)
Section titled “new ClientUser([data], client)”Constructs a new instance of the class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The initial data for the instance. |
| client | Client | The client object. |
clientUser.setAvatar(avatar) ⇒ Promise
Section titled “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.
| Param | Type | Description |
|---|---|---|
| avatar | string | The 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.
| Param | Type | Description |
|---|---|---|
| username | string | The 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.
| Param | Type | Description |
|---|---|---|
| avatarDecorations | Object | The avatar decorations to set. |
clientUser.setPresence(presence) ⇒ void
Section titled “clientUser.setPresence(presence) ⇒ void”Sets the presence of the client.
Kind: instance method of ClientUser
| Param | Type | Description |
|---|---|---|
| presence | Presence | The presence object containing the desired presence information. |
clientUser.setStatus(status) ⇒ void
Section titled “clientUser.setStatus(status) ⇒ void”Sets the status of the user.
Kind: instance method of ClientUser
| Param | Type | Description |
|---|---|---|
| status | string | The 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
| Param | Type | Description |
|---|---|---|
| activities | Array | An array of activity objects. |