Skip to content

Commit 3fa429c

Browse files
almeidxsdanialrazakodiakhq[bot]
authored andcommitted
feat(ClientApplication): add approximateUserAuthorizationCount (#10933)
Co-authored-by: Danial Raza <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 7713627 commit 3fa429c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ class ClientApplication extends Application {
163163
this.approximateUserInstallCount ??= null;
164164
}
165165

166+
if ('approximate_user_authorization_count' in data) {
167+
/**
168+
* An approximate amount of users that have OAuth2 authorizations for this application.
169+
*
170+
* @type {?number}
171+
*/
172+
this.approximateUserAuthorizationCount = data.approximate_user_authorization_count;
173+
} else {
174+
this.approximateUserAuthorizationCount ??= null;
175+
}
176+
166177
if ('guild_id' in data) {
167178
/**
168179
* The id of the guild associated with this application.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ export class ClientApplication extends Application {
11591159
public flags: Readonly<ApplicationFlagsBitField>;
11601160
public approximateGuildCount: number | null;
11611161
public approximateUserInstallCount: number | null;
1162+
public approximateUserAuthorizationCount: number | null;
11621163
public tags: string[];
11631164
public installParams: ClientApplicationInstallParams | null;
11641165
public integrationTypesConfig: IntegrationTypesConfiguration | null;

0 commit comments

Comments
 (0)