Skip to content

Commit 9680f42

Browse files
almeidxsdanialrazakodiakhq[bot]
authored
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 01c2fbe commit 9680f42

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
@@ -178,6 +178,17 @@ class ClientApplication extends Application {
178178
this.approximateUserInstallCount ??= null;
179179
}
180180

181+
if ('approximate_user_authorization_count' in data) {
182+
/**
183+
* An approximate amount of users that have OAuth2 authorizations for this application.
184+
*
185+
* @type {?number}
186+
*/
187+
this.approximateUserAuthorizationCount = data.approximate_user_authorization_count;
188+
} else {
189+
this.approximateUserAuthorizationCount ??= null;
190+
}
191+
181192
if ('guild_id' in data) {
182193
/**
183194
* 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
@@ -947,6 +947,7 @@ export class ClientApplication extends Application {
947947
public flags: Readonly<ApplicationFlagsBitField>;
948948
public approximateGuildCount: number | null;
949949
public approximateUserInstallCount: number | null;
950+
public approximateUserAuthorizationCount: number | null;
950951
public tags: string[];
951952
public installParams: ClientApplicationInstallParams | null;
952953
public integrationTypesConfig: IntegrationTypesConfiguration | null;

0 commit comments

Comments
 (0)