ZerioDev / Music-bot

A complete code to download for a cool Discord music bot !
https://discord.gg/5cGSYV8ZZj
GNU General Public License v3.0
864 stars 1.05k forks source link

Wont run #279

Closed faulty-teen closed 6 months ago

faulty-teen commented 1 year ago

I know it says to use the beta one but no matter if im using the beta one or the main one, i always get this error in the vs code terminal: `Uncaught Error Error: Cannot find module 'discord-player' Require stack:

Im running without debuggin idk whats going wrong

faulty-teen commented 1 year ago

Ok managed to fix that but new error: Uncaught Error Error: ENOENT: no such file or directory, scandir './events/Discord/' at readdirSync (node:fs:1452:3) at <anonymous> (file:///C:/Users/Faulty/Downloads/Music-bot-beta-Bugs-are-expected-/Music-bot-beta-Bugs-are-expected-/src/loader.js:9:23) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at <anonymous> (file:///C:/Users/Faulty/Downloads/Music-bot-beta-Bugs-are-expected-/Music-bot-beta-Bugs-are-expected-/main.js:22:1) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at executeUserEntryPoint (node:internal/modules/run_main:81:12) at <anonymous> (node:internal/main/run_main_module:23:47)

faulty-teen commented 1 year ago

its saying at the bottom something about no debugger but i have node.js installed and selected as the debugger edit: its saying it cant find ./events/Discord/

BananinBanano commented 1 year ago

That's bc you're trying to load a file that doesn't exist, just create "events" folder, and then, inside it, make another folder named "Discord"

faulty-teen commented 1 year ago

image its already there

BananinBanano commented 1 year ago

Then go to src/loader.js line 9 and change "./events/Discord/" to "../events/Discord/" if that doesn't work, try " ${process.cwd()}/events/Discord/ "

faulty-teen commented 1 year ago

yh still getting error not finding that file tried both

faulty-teen commented 1 year ago

idk whats wrong with it bc its clearly there

Fluffik3666 commented 1 year ago

@faulty-teen Do to the main.js file. I had the same error btw. Leave the events stuff the same and type in your console (assuming you have npm and node.js installed) "node run main.js" or, if that doesn't work, do "node main.js". This should fix it:)

Fluffik3666 commented 1 year ago

Also make sure that main.js is the same and not edited.

faulty-teen commented 1 year ago

@faulty-teen Do to the main.js file. I had the same error btw. Leave the events stuff the same and type in your console (assuming you have npm and node.js installed) "node run main.js" or, if that doesn't work, do "node main.js". This should fix it:)

do what to main.js

faulty-teen commented 1 year ago

when i do node main.js in my console i get this:

Error: ENOENT: no such file or directory, scandir '${process.cwd()}/events/Discord/'

Fluffik3666 commented 1 year ago

hm

Fluffik3666 commented 1 year ago

@faulty-teen you don't have the libraries installed. run npm install

pendragons-code commented 1 year ago

wait i don't get this part, using a concatenated string without actually adding anything?

like

 '${process.cwd()}/events/Discord/'
and not
`${process.cwd()}/events/Discord/`
TejesMunde commented 11 months ago

Can Anyone tell me how to fix this error ???

C:\Users\tejes\Downloads\Music-bot-master\Music-bot-master\node_modules\@discordjs\ws\dist\index.js:1066 throw new Error("Used disallowed intents"); ^ Error: Used disallowed intents at WebSocketShard.onClose (C:\Users\tejes\Downloads\Music-bot-master\Music-bot-master\node_modules\@discordjs\ws\dist\index.js:1066:15) at WebSocket.emit (node:events:514:28) at WebSocket.emitClose (C:\Users\tejes\Downloads\Music-bot-master\Music-bot-master\node_modules\ws\lib\websocket.js:258:10) at TLSSocket.socketOnClose (C:\Users\tejes\Downloads\Music-bot-master\Music-bot-master\node_modules\ws\lib\websocket.js:1264:15) at TLSSocket.emit (node:events:526:35) at node:net:323:12

iGameCreep commented 6 months ago

Old message, and please create a new issue for new errors / join the Discord server. This means some intents were not activated in the Developer Portal. Go on it, select your bot, go in the "Bot" tab and check all of the Privileged Gateway Intents