This commit is contained in:
Elysia
2023-06-21 11:57:21 +07:00
parent a176df7e20
commit aa749efa64
3 changed files with 24 additions and 14 deletions

View File

@@ -617,7 +617,7 @@ class ClientUser extends User {
/**
* Set pronouns
* @param {string | null} pronouns
* @param {?string} pronouns Your pronouns
* @returns {Promise<ClientUser>}
*/
setPronouns(pronouns = '') {

View File

@@ -54,33 +54,29 @@ class User extends Base {
* Time that User has nitro (Unix Timestamp)
* <info>The user must be force fetched for this property to be present or be updated</info>
* @type {?number}
* @readonly
*/
this.premiumSince = null;
/**
* Time that User has nitro and boost server (Unix Timestamp)
* @type {?number}
* @readonly
*/
this.premiumGuildSince = null;
/**
* About me (User)
* <info>The user must be force fetched for this property to be present or be updated</info>
* @type {?string}
* @readonly
*/
this.bio = null;
/**
* This user is on the same servers as Client User
* Pronouns (User)
* <info>The user must be force fetched for this property to be present or be updated</info>
* @type {Collection<Snowflake, Guild>}
* @readonly
* @type {?string}
*/
this.mutualGuilds = new Collection();
this.pronouns = null;
this._mutualGuilds = [];
/**
* [Bot] Application
* @type {?ClientApplication}
* @readonly
*/
this.application = application ? new ClientApplication(this.client, application, this) : null;
this._partial = true;
@@ -202,6 +198,16 @@ class User extends Base {
}
}
/**
* This user is on the same servers as Client User
* <info>The user must be force fetched for this property to be present or be updated</info>
* @type {Collection<Snowflake, Guild>}
* @readonly
*/
get mutualGuilds() {
return new Collection(this._mutualGuilds.map(obj => [obj.id, obj]));
}
/**
* Get all mutual friends (Client -> User)
* @type {Promise<Collection<Snowflake, User>>}
@@ -335,7 +341,9 @@ class User extends Base {
// Unknown
}
this.mutualGuilds = new Collection(data.mutual_guilds.map(obj => [obj.id, obj]));
if ('mutual_guilds' in data) {
this._mutualGuilds = data.mutual_guilds;
}
}
/**