Gotowka / mydbm

MIT License
2 stars 3 forks source link

Errors while running the bot #1

Closed supertrio17 closed 1 year ago

supertrio17 commented 1 year ago

D:\DBM\sempltekst\New Bot Project\bot.js:251 if(typeof DiscordJS.Intents.FLAGS.MESSAGE_CONTENT === "undefined") { ^

TypeError: Cannot read properties of undefined (reading 'FLAGS') at Object. (D:\DBM\sempltekst\New Bot Project\bot.js:251:29) at Module._compile (node:internal/modules/cjs/loader:1097:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47

Node.js v17.4.0

D:\DBM\sempltekst\New Bot Project>

Gotowka commented 1 year ago

What is the discord.js version?

supertrio17 commented 1 year ago

In module manager I typed in latest, and I think it messed with the whole bot, I'm making a new project right now

supertrio17 commented 1 year ago

Should I update discord.js from module manager or cmd?

supertrio17 commented 1 year ago

D:\DBM\sempltekst\sempltekst2\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:\DBM\sempltekst\sempltekst2\node_modules\discord-player\dist\Player.js:50:47) at Object. (D:\DBM\sempltekst\sempltekst2\bot.js:37:15) at Module._compile (node:internal/modules/cjs/loader:1097:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47

Node.js v17.4.0

Now I get this error

Gotowka commented 1 year ago

Use the discord.js 13.7.0

Gotowka commented 1 year ago

and discord-player@5.2.2

Gotowka commented 1 year ago

And use cmd to update modules

supertrio17 commented 1 year ago

I did it, now I get this error:

Bot is ready! Error with the Command "play": DiscordAPIError: Unknown interaction at RequestHandler.execute (D:\DBM\sempltekst\sempltekst2\node_modules\discord.js\src\rest\RequestHandler.js:350:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (D:\DBM\sempltekst\sempltekst2\node_modules\discord.js\src\rest\RequestHandler.js:51:14) at async CommandInteraction.reply (D:\DBM\sempltekst\sempltekst2\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:103:5)