mirror of
https://github.com/discordjs/discord.js.git
synced 2026-09-18 09:17:28 +00:00
feat(GuildMember): #pending (#5121)
* Add GuildMember#isPending * Rename is_pending to pending * Improve jsdoc wording * pending isn't nullable * ??
This commit is contained in:
@@ -64,6 +64,12 @@ class GuildMember extends Base {
|
||||
*/
|
||||
this.nickname = null;
|
||||
|
||||
/**
|
||||
* Whether this member has yet to pass the guild's membership gate
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.pending = false;
|
||||
|
||||
this._roles = [];
|
||||
if (data) this._patch(data);
|
||||
}
|
||||
@@ -81,6 +87,7 @@ class GuildMember extends Base {
|
||||
if ('joined_at' in data) this.joinedTimestamp = new Date(data.joined_at).getTime();
|
||||
if ('premium_since' in data) this.premiumSinceTimestamp = new Date(data.premium_since).getTime();
|
||||
if ('roles' in data) this._roles = data.roles;
|
||||
this.pending = data.pending ?? false;
|
||||
}
|
||||
|
||||
_clone() {
|
||||
|
||||
Vendored
+1
@@ -803,6 +803,7 @@ declare module 'discord.js' {
|
||||
public readonly displayName: string;
|
||||
public guild: Guild;
|
||||
public readonly id: Snowflake;
|
||||
public pending: boolean;
|
||||
public readonly joinedAt: Date | null;
|
||||
public joinedTimestamp: number | null;
|
||||
public readonly kickable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user