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

error when running node index.js load #11

Open
patritha opened this issue Nov 19, 2022 · 1 comment
Open

error when running node index.js load #11

patritha opened this issue Nov 19, 2022 · 1 comment

Comments

@patritha
Copy link

this is the console output

`PS D:\el musica> node index.js load
D:\el musica\node_modules\discord-player\dist\Player.js:50
if (this.client?.options?.intents && !new discord_js_1.IntentsBitField(this.client?.options?.intents).has(discord_js_1.IntentsBitField.Flags.GuildVoiceStates)) {
^

TypeError: discord_js_1.IntentsBitField is not a constructor
at new Player (D:\el musica\node_modules\discord-player\dist\Player.js:50:47)
at Object. (D:\el musica\index.js:24:17)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.12.1`

@Julzies
Copy link

Julzies commented Jan 2, 2023

Did you change the intents to something like GatewayIntentBits.Guilds instead of "GUILDS" in your index,js
Try changing that if you haven't and make a const for it to require discord.js
I dunno how to really explain it since I don't code :^) but I'll help you if you still need

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

No branches or pull requests

2 participants