Update Bot
This commit is contained in:
24
node_modules/discord.js/src/structures/GuildMember.js
generated
vendored
24
node_modules/discord.js/src/structures/GuildMember.js
generated
vendored
@@ -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 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user