From bd7f4b6df7e53f170ab29c5e712f5ed5d7db5572 Mon Sep 17 00:00:00 2001 From: Kshitij Anurag <230598819+kshitijanurag@users.noreply.github.com> Date: Sat, 23 May 2026 19:35:39 +0530 Subject: [PATCH] feat(OAuth2Scopes): add `IdentifyPremium` scope (#1648) --- deno/payloads/v10/oauth2.ts | 7 +++++++ deno/payloads/v10/user.ts | 1 + deno/payloads/v9/oauth2.ts | 7 +++++++ deno/payloads/v9/user.ts | 1 + payloads/v10/oauth2.ts | 7 +++++++ payloads/v10/user.ts | 1 + payloads/v9/oauth2.ts | 7 +++++++ payloads/v9/user.ts | 1 + 8 files changed, 32 insertions(+) diff --git a/deno/payloads/v10/oauth2.ts b/deno/payloads/v10/oauth2.ts index 2bbcf0f3..a1a58377 100644 --- a/deno/payloads/v10/oauth2.ts +++ b/deno/payloads/v10/oauth2.ts @@ -30,6 +30,13 @@ export enum OAuth2Scopes { * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = 'identify', + /** + * Allows your app to read a user's Nitro subscription type as defined by `premium_type` on the + * {@link https://docs.discord.com/developers/resources/user#user-object-user-structure | User object} - only available to approved partners + * + * @see {@link https://docs.discord.com/developers/resources/user#user-object-user-structure} + */ + IdentifyPremium = 'identify.premium', /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds diff --git a/deno/payloads/v10/user.ts b/deno/payloads/v10/user.ts index 6a44aed1..a0559b58 100644 --- a/deno/payloads/v10/user.ts +++ b/deno/payloads/v10/user.ts @@ -74,6 +74,7 @@ export interface APIUser { /** * The type of Nitro subscription on a user's account * + * @remarks This field will return `0` for applications that have not been approved for the {@link OAuth2Scopes.IdentifyPremium} scope. * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; diff --git a/deno/payloads/v9/oauth2.ts b/deno/payloads/v9/oauth2.ts index 89f4ea69..979840c6 100644 --- a/deno/payloads/v9/oauth2.ts +++ b/deno/payloads/v9/oauth2.ts @@ -30,6 +30,13 @@ export enum OAuth2Scopes { * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = 'identify', + /** + * Allows your app to read a user's Nitro subscription type as defined by `premium_type` on the + * {@link https://docs.discord.com/developers/resources/user#user-object-user-structure | User object} - only available to approved partners + * + * @see {@link https://docs.discord.com/developers/resources/user#user-object-user-structure} + */ + IdentifyPremium = 'identify.premium', /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds diff --git a/deno/payloads/v9/user.ts b/deno/payloads/v9/user.ts index 6a44aed1..a0559b58 100644 --- a/deno/payloads/v9/user.ts +++ b/deno/payloads/v9/user.ts @@ -74,6 +74,7 @@ export interface APIUser { /** * The type of Nitro subscription on a user's account * + * @remarks This field will return `0` for applications that have not been approved for the {@link OAuth2Scopes.IdentifyPremium} scope. * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; diff --git a/payloads/v10/oauth2.ts b/payloads/v10/oauth2.ts index 2bbcf0f3..a1a58377 100644 --- a/payloads/v10/oauth2.ts +++ b/payloads/v10/oauth2.ts @@ -30,6 +30,13 @@ export enum OAuth2Scopes { * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = 'identify', + /** + * Allows your app to read a user's Nitro subscription type as defined by `premium_type` on the + * {@link https://docs.discord.com/developers/resources/user#user-object-user-structure | User object} - only available to approved partners + * + * @see {@link https://docs.discord.com/developers/resources/user#user-object-user-structure} + */ + IdentifyPremium = 'identify.premium', /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds diff --git a/payloads/v10/user.ts b/payloads/v10/user.ts index c4a5d966..e185389b 100644 --- a/payloads/v10/user.ts +++ b/payloads/v10/user.ts @@ -74,6 +74,7 @@ export interface APIUser { /** * The type of Nitro subscription on a user's account * + * @remarks This field will return `0` for applications that have not been approved for the {@link OAuth2Scopes.IdentifyPremium} scope. * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; diff --git a/payloads/v9/oauth2.ts b/payloads/v9/oauth2.ts index 89f4ea69..979840c6 100644 --- a/payloads/v9/oauth2.ts +++ b/payloads/v9/oauth2.ts @@ -30,6 +30,13 @@ export enum OAuth2Scopes { * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = 'identify', + /** + * Allows your app to read a user's Nitro subscription type as defined by `premium_type` on the + * {@link https://docs.discord.com/developers/resources/user#user-object-user-structure | User object} - only available to approved partners + * + * @see {@link https://docs.discord.com/developers/resources/user#user-object-user-structure} + */ + IdentifyPremium = 'identify.premium', /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds diff --git a/payloads/v9/user.ts b/payloads/v9/user.ts index c4a5d966..e185389b 100644 --- a/payloads/v9/user.ts +++ b/payloads/v9/user.ts @@ -74,6 +74,7 @@ export interface APIUser { /** * The type of Nitro subscription on a user's account * + * @remarks This field will return `0` for applications that have not been approved for the {@link OAuth2Scopes.IdentifyPremium} scope. * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType;