Update Bot

This commit is contained in:
2026-03-15 11:58:43 +01:00
parent b67c111ffc
commit cd99275933
560 changed files with 23173 additions and 55113 deletions

View File

@@ -24,6 +24,12 @@ class GuildMember extends Base {
*/
this.guild = guild;
/**
* The timestamp the member joined the guild at
* @type {?number}
*/
this.joinedTimestamp = null;
/**
* The last timestamp this member started boosting the guild
* @type {?number}
@@ -56,7 +62,7 @@ class GuildMember extends Base {
*/
Object.defineProperty(this, '_roles', { value: [], writable: true });
this._patch(data);
if (data) this._patch(data);
}
_patch(data) {
@@ -89,17 +95,7 @@ class GuildMember extends Base {
this.banner ??= null;
}
if ('joined_at' in data) {
/**
* The timestamp the member joined the guild at
*
* @type {?number}
*/
this.joinedTimestamp = data.joined_at && Date.parse(data.joined_at);
} else {
this.joinedTimestamp ??= null;
}
if ('joined_at' in data) this.joinedTimestamp = Date.parse(data.joined_at);
if ('premium_since' in data) {
this.premiumSinceTimestamp = data.premium_since ? Date.parse(data.premium_since) : null;
}
@@ -426,9 +422,7 @@ class GuildMember extends Base {
* .catch(console.error);
*/
setNickname(nick, reason) {
return this.user.id === this.client.user.id
? this.guild.members.editMe({ nick, reason })
: this.edit({ nick, reason });
return this.edit({ nick, reason });
}
/**