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

Included typings for @discordjs/voice break the voice lib typings #6009

Closed
beni69 opened this issue Jul 2, 2021 · 1 comment · Fixed by discordjs/voice#149
Closed

Included typings for @discordjs/voice break the voice lib typings #6009

beni69 opened this issue Jul 2, 2021 · 1 comment · Fixed by discordjs/voice#149

Comments

@beni69
Copy link

beni69 commented Jul 2, 2021

yes, i know this issue is technically voice related but im submitting it here because i believe the code that needs to be fixed is in this repo

Please describe the problem you are having in as much detail as possible:
Since #5941 the typings for @discordjs/voice are included in the main discord.js package. This breaks typescript support for the actual voice library, because typescript just picks up the exports that are declared in the main package. Since this is just a typings problem, regular javascript users seem to be unaffected.

To others struggling with this, there is a workaround, just do this:

import { } from "@discordjs/voice/dist"

Include a reproducible code sample here, if possible:

import { AudioPlayer } from "@discordjs/voice"; // you can import anything else, and it won't work
// Module '"@discordjs/voice"' has no exported member 'AudioPlayer'

Further details:

  • discord.js version: 13.0.0-dev.fe6cc0c.1625227356
  • Node.js version: 14.17.0
  • Operating system: windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: high because it breaks the voice library for everyone using typescript

Relevant client options:

  • partials: none
  • gateway intents: none
  • other: none
@kyranet
Copy link
Member

kyranet commented Jul 2, 2021

Fixed by discordjs/voice#149

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants