feat: Update

- Event for GroupDM
- Friend nickname
#29
This commit is contained in:
March 7th
2022-09-16 19:08:15 +07:00
parent 84b6842db0
commit 70cde7df55
12 changed files with 130 additions and 12 deletions

View File

@@ -196,6 +196,15 @@ class User extends Base {
return this.client.user.notes.get(this.id);
}
/**
* Get friend nickname
* @type {?string}
* @readonly
*/
get nickname() {
return this.client.user.friendNicknames.get(this.id);
}
/**
* The voice state of this member
* @type {VoiceState}
@@ -282,6 +291,16 @@ class User extends Base {
return this.client.relationships.addFriend(this);
}
/**
* Changes the nickname of the friend
* @param {?string} nickname The nickname to change
* @type {boolean}
* @returns {Promise<boolean>}
*/
setNickname(nickname) {
return this.client.user.setNickname(this.id, nickname);
}
/**
* Send Friend Request to the user
* @type {boolean}