Added Pronouns support

Updated ClientUser.js

+ Pronouns Support
+ setPronouns Method
This commit is contained in:
Mega 2023-06-20 16:44:52 +03:00 committed by GitHub
parent b0518a7d7c
commit dd99e47c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,9 @@ class ClientUser extends User {
if ('bio' in data) {
this.bio = data.bio;
}
if ('pronouns' in data) {
this.pronouns = data.pronouns;
}
if (!this.friendNicknames?.size) {
/**
@ -611,6 +614,15 @@ class ClientUser extends User {
setGlobalName(globalName = '') {
return this.edit({ global_name: globalName });
}
/**
* Set pronouns
* @param {string | null} bio of pronouns
* @returns {Promise<ClientUser>}
*/
setPronouns(pronouns = '') {
return this.edit({ pronouns });
}
}
module.exports = ClientUser;