feat(OAuth2Scopes): add IdentifyPremium scope (#1648)

This commit is contained in:
Kshitij Anurag
2026-05-23 19:35:39 +05:30
committed by GitHub
parent 5be1ad2bd3
commit bd7f4b6df7
8 changed files with 32 additions and 0 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;