diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 9d573fc69..8f5da28dc 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -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() { diff --git a/typings/index.d.ts b/typings/index.d.ts index c4b14d8bb..e4e2027e4 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -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;