Update Bot (j'ai plus le repo sur GitHub)

Qui c'est la conne qui a delete le repo sur GitHub? C'EST MOIIIII
This commit is contained in:
2026-02-09 14:36:26 +01:00
parent eab4419e12
commit ad2014b7b2
586 changed files with 58986 additions and 25205 deletions

View File

@@ -24,12 +24,6 @@ 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}
@@ -62,7 +56,7 @@ class GuildMember extends Base {
*/
Object.defineProperty(this, '_roles', { value: [], writable: true });
if (data) this._patch(data);
this._patch(data);
}
_patch(data) {
@@ -95,7 +89,17 @@ class GuildMember extends Base {
this.banner ??= null;
}
if ('joined_at' in data) this.joinedTimestamp = Date.parse(data.joined_at);
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 ('premium_since' in data) {
this.premiumSinceTimestamp = data.premium_since ? Date.parse(data.premium_since) : null;
}
@@ -422,7 +426,9 @@ class GuildMember extends Base {
* .catch(console.error);
*/
setNickname(nick, reason) {
return this.edit({ nick, reason });
return this.user.id === this.client.user.id
? this.guild.members.editMe({ nick, reason })
: this.edit({ nick, reason });
}
/**