Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize required version of discord-api-types across packages #10533

Closed
kevinlul opened this issue Oct 3, 2024 · 2 comments
Closed

Synchronize required version of discord-api-types across packages #10533

kevinlul opened this issue Oct 3, 2024 · 2 comments

Comments

@kevinlul
Copy link

kevinlul commented Oct 3, 2024

Which package is this bug report for?

ws

Issue description

  1. Install the latest version of discord.js (currently 14.16.3)
  2. Observe that three separate versions of discord-api-types are installed:
    • 0.37.100 via discord.js
    • 0.37.97 via @discordjs/builders, @discordjs/formatters, @discordjs/rest
    • 0.37.83 via @discordjs/ws
  3. This causes incompatible typings for RESTPostAPIApplicationCommandsJSONBody between the import from discord.js and the one from discord-api-types/v10 because multiple versions of discord-api-types are in use

Code sample

No response

Versions

  • discord.js 14.16.3

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@kevinlul
Copy link
Author

kevinlul commented Oct 4, 2024

Sample TypeScript compiler error:

Type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord.js/node_modules/discord-api-types/rest/v10/interactions").RESTPostAPIApplicationCommandsJSONBody' is not assignable to type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord-api-types/rest/v10/interactions").RESTPostAPIApplicationCommandsJSONBody'.
      Type 'RESTPostAPIChatInputApplicationCommandsJSONBody' is not assignable to type 'RESTPostAPIApplicationCommandsJSONBody'.
        Type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord.js/node_modules/discord-api-types/rest/v10/interactions").RESTPostAPIChatInputApplicationCommandsJSONBody' is not assignable to type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord-api-types/rest/v10/interactions").RESTPostAPIChatInputApplicationCommandsJSONBody'.
          Types of property 'type' are incompatible.
            Type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands").ApplicationCommandType.ChatInput | undefined' is not assignable to type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands").ApplicationCommandType.ChatInput | undefined'.
              Type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands").ApplicationCommandType.ChatInput' is not assignable to type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands").ApplicationCommandType.ChatInput'.
                Property 'PrimaryEntryPoint' is missing in type 'import("/home/runner/work/bastion-bot/bastion-bot/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands").ApplicationCommandType'.

@didinele
Copy link
Member

didinele commented Oct 4, 2024

Should be resolved by #10524 already. Waiting for a release cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants