Skip to content

Commit d0451c2

Browse files
committed
feat(ClientApplication): add approximateGuildCount
1 parent caf9cde commit d0451c2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/discord.js/src/structures/ClientApplication.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ class ClientApplication extends Application {
6969
this.flags = new ApplicationFlagsBitField(data.flags).freeze();
7070
}
7171

72+
if ('approximate_guild_count' in data) {
73+
/**
74+
* An approximate amount of guilds this application is in.
75+
* @type {?number}
76+
*/
77+
this.approximateGuildCount = data.approximate_guild_count;
78+
} else {
79+
this.approximateGuildCount ??= null;
80+
}
81+
7282
if ('owner' in data) {
7383
this._owner = this.client.users._add(data.owner);
7484
} else {

packages/discord.js/typings/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ export class ClientApplication extends Application {
10161016
public get guild(): Guild | null;
10171017
public cover: string | null;
10181018
public flags: Readonly<ApplicationFlagsBitField>;
1019+
public approximateGuildCount: number | null;
10191020
public tags: string[];
10201021
public installParams: ClientApplicationInstallParams | null;
10211022
public customInstallURL: string | null;

0 commit comments

Comments
 (0)