mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
committed by
GitHub
parent
e37160f4e3
commit
c4c817116f
@@ -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() {
|
||||
|
||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -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