#discord.js Guide
1 messages · Page 1 of 1 (latest)
what you mean the guide ?
yes
you need also a understanding of javascript
but i think if you started with djs recently the guide is a good way yes!
i mean they have examples and stuff
what do I do in this situation
did everything that was here I guess
sorry id didnt saw your messages
did you created an bot file where you want to run your code / bot
I did
because the error says that you dont have an file called "index.js"
in your folder you are trying to run the code
it's called trial.js but it's still not running
I did but where should I save the file
okay in the folder where you have the js file , your bot file called in your case like "trial.js" where you want to use your bot and login and stuff right? in that file try to start the bot with node yourfile.js <-- replace the yourfile.js with the name of the file you want to start
in your case should that be "node trial.js"
you put your file in the "node_modules" folder but trying to start in the the folder "Yamz"
you can move the file to the "Yamz" folder or move with the powershell / cmd to the "node_modules" folder
you have to create an file named "config.json"
or maybe its the same thing like last time
wrong folder
if you are trying to start a js file with "node bla.js" it have to be in the folder you are trying to execute the command
C:/Users/MyCoolName: > node myfile.js = it works because in that folder is my file
C:/Users/MyCoolName/MyCoolFolder: > node myfile.js = dont work wrong folder ( file is not present )
same thing with imports in your file like config.json
const { token } = require("./config.json") = works because in THAT folder is my file named config.json with my Discord Token
const { token } = require("../config.json") = Dont work because my config.json is not in that folder
thats also Javascript basics so i would recommend to learn first the basic js things and then try to start coding a bot with the guide like you did