You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{OAuth2API}from"@discordjs/core";import{REST}from"@discordjs/rest";// Set up the Discord REST clientconstrest=discord_bot_token&&(newREST().setToken(discord_bot_token));// Bot installation linkconstbot_install_url=rest&&(newOAuth2API(rest).generateAuthorizationURL({permissions: "8",// TypeError: Object literal may only specify known properties, and 'permissions' does not exist in type 'RESTOAuth2AuthorizationQuery'.client_id: discord_client_id||"",response_type: "code",scope: ["bot","guilds","guilds.members.read","identify","messages.read",].join(" "),}));
Versions
@discordjs/core: 2.0.0
@discordjs/rest: 2.4.0
Issue priority
Low (slightly annoying)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
@discordjs/core 2.0.1-dev.1726186279-495bc6034
@discordjs/rest 2.4.1-dev.1726186275-495bc6034
The text was updated successfully, but these errors were encountered:
The method you are using is generating an authorisation URL (code grant) which you can see by visiting the documentation associated with the method.
It seems what you want is an application invite URL. That is governed by the RESTOAuth2BotAuthorizationQuery type and is not in the core package as it is not an API method.
Which package is this bug report for?
core
Issue description
generateAuthorizationURL
on the OAuth2API instance, supplying apermissions
parameter for bot installationObject literal may only specify known properties, and 'permissions' does not exist in type 'RESTOAuth2AuthorizationQuery'.
Additionally, RESTOAuth2BotAuthorizationQuery is available in the documentation, but is not exported by
rest/v10/oauth2.ts
.Code sample
Versions
Issue priority
Low (slightly annoying)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
The text was updated successfully, but these errors were encountered: