Closed Mighty683 closed 2 years ago
discord.js
v13.7.0 works best with discord-api-types 0.30.0, see here, and you must as well use discord-api-types/v9
instead of discord-api-types/v10
as well, since it's the version both its http and ws handlers use by default. @discordjs/rest
v4.0.1 uses discord-api-types 0.29.0, which is a mismatching version.
To get around this version conflict, you can use npm's overrides or Yarn's resolutions to set the version of discord-api-types
to 0.30.0.
Warning
@discordjs/rest
v4.0.1 uses/v10
, not/v9
likediscord.js
v13.7.0 does. This means that you cannot use types interchangeably. Please keep this in mind when building your bot.
If you desire to use discord-api-types 0.33.0 (and by extension, also latest /rest and /builders), please switch to the development versions. At the time of writing, the very latest versions you can get (which I can confirm they work) are:
discord.js
14.0.0-dev.1653091711-fdeac9d@discordjs/builders
0.14.0-dev.1653091712-fdeac9d@discordjs/rest
0.5.0-dev.1653091732-fdeac9dTo help updating to the development version (named v14), we also have a migration guide PR, you can also see the preview here.
I'll close this as wontfix because it's not an issue the library can resolve, but rather an issue with conflicting versions, which you as a user can fix.
Which package is this bug report for?
builders
Issue description
Client.application.commands.set
is usingRESTPostAPIApplicationCommandsJSONBody
type fromdiscord-api-types/rest/v9
butSlashCommandBuilder.toJSON
is usingRESTPostAPIApplicationCommandsJSONBody
fromdiscord-api-types/rest/v10
, which is causing type errors when I try to useSlashCommandBuilder
to build an command for application.Packages versions which I use:
Code sample
Package version
13.7.0
Node.js version
16.13
Operating system
Alpine Linux Docker Container
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
Not applicable (subpackage bug), No Partials
Which gateway intents are you subscribing to?
Guilds
I have tested this issue on a development release
No response