11import type { Permissions , Snowflake } from '../../globals.ts' ;
2- import type { APIApplication , APIGuild , APIUser , APIWebhook , OAuth2Scopes } from '../../payloads/v10/mod.ts' ;
2+ import type {
3+ APIApplication ,
4+ APIGuild ,
5+ APIUser ,
6+ APIWebhook ,
7+ OAuth2PublicUserScopes ,
8+ OAuth2GuildScopes ,
9+ OAuth2OtherScopes ,
10+ OAuth2RestrictedUserScopes ,
11+ OAuth2PrivateUserScopes ,
12+ } from '../../payloads/v10/mod.ts' ;
313
414/**
515 * https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
@@ -17,7 +27,13 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
1727 /**
1828 * the scopes the user has authorized the application for
1929 */
20- scopes : OAuth2Scopes [ ] ;
30+ scopes : (
31+ | OAuth2PublicUserScopes
32+ | OAuth2GuildScopes
33+ | OAuth2OtherScopes
34+ | OAuth2RestrictedUserScopes
35+ | OAuth2PrivateUserScopes
36+ ) [ ] ;
2137 /**
2238 * when the access token expires
2339 */
@@ -121,10 +137,10 @@ export interface RESTOAuth2BotAuthorizationQuery {
121137 * Needs to include bot for the bot flow
122138 */
123139 scope :
124- | OAuth2Scopes . Bot
125- | `${string } ${' ' | '%20' } ${OAuth2Scopes . Bot } `
126- | `${OAuth2Scopes . Bot } ${' ' | '%20' } ${string } `
127- | `${string } ${' ' | '%20' } ${OAuth2Scopes . Bot } ${string } ${' ' | '%20' } `;
140+ | OAuth2GuildScopes . Bot
141+ | `${string } ${' ' | '%20' } ${OAuth2GuildScopes . Bot } `
142+ | `${OAuth2GuildScopes . Bot } ${' ' | '%20' } ${string } `
143+ | `${string } ${' ' | '%20' } ${OAuth2GuildScopes . Bot } ${string } ${' ' | '%20' } `;
128144 /**
129145 * The permissions you're requesting
130146 *
@@ -150,10 +166,10 @@ export interface RESTOAuth2AdvancedBotAuthorizationQuery {
150166 * This assumes you include the `bot` scope alongside others (like `identify` for example)
151167 */
152168 scope :
153- | OAuth2Scopes . Bot
154- | `${string } ${' ' | '%20' } ${OAuth2Scopes . Bot } `
155- | `${OAuth2Scopes . Bot } ${' ' | '%20' } ${string } `
156- | `${string } ${' ' | '%20' } ${OAuth2Scopes . Bot } ${string } ${' ' | '%20' } `;
169+ | OAuth2GuildScopes . Bot
170+ | `${string } ${' ' | '%20' } ${OAuth2GuildScopes . Bot } `
171+ | `${OAuth2GuildScopes . Bot } ${' ' | '%20' } ${string } `
172+ | `${string } ${' ' | '%20' } ${OAuth2GuildScopes . Bot } ${string } ${' ' | '%20' } `;
157173 /**
158174 * The required permissions bitfield, stringified
159175 */
0 commit comments