splite icon indicating copy to clipboard operation
splite copied to clipboard

discord_js_1.IntentsBitField is not a constructor

Open prosilentgamer2 opened this issue 3 years ago • 1 comments

2022-09-11 23:35:17 - info [app.js]: Initializing... /home/Bot/node_modules/discord-player/dist/Player.js:46 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 (/home/Bot/node_modules/discord-player/dist/Player.js:46:47) at new Client (/home/Bot/src/Client.js:53:23) at Object. (/home/Bot/app.js:15:16) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47

prosilentgamer2 avatar Sep 11 '22 21:09 prosilentgamer2

Changing the discord-player package version from 5.3.2 to 3.0.0 in /package.json seems to have fixed the issue.

AdroidNoodle avatar Oct 18 '22 14:10 AdroidNoodle

Changing the discord-player package version from 5.3.2 to 3.0.0 in /package.json seems to have fixed the issue.

This was the issue, discord-player was not compatible with discord.js 13.

The bot has been updated to DiscordJS 14 with update dd9442e. And this issue should no longer exist.

416rehman avatar Nov 02 '22 21:11 416rehman