Hi i am having the problem, (se eimage underneath) for a bit of time. To me it is clear that the direcory exists.
My fs.readdir should work fine, since it does so with recipes and writing, but not art. <–Files
I have no other errors, and honestly I just don’t know how to fix this, also it is my first time “hosting” a bot like this. Though this have not worked for me for weeks, I thought it was time to go all you experts, sicne I cannot find the solution myself.
I have this project, where I host a discord bot for my server, and it works fine. All commands work etc. expect i get this “funny” error. I hope someone can help.
If you take a closer look at the error you’ll see that it’s trying to get ./commands/art which doesn’t really exist. It should instead be searching for ./commands/art.js. This leads me to assume that something is wrong with your command handler.
Hmm I tried to add .js after, but it still gives the same error. As you can see in my image posted below, that nothing is wrong with all the other fs.readdir’s, and I have 8, only one won’t work. The one in question is the 6th.
I have solved it.
It turns out that it is because I didn’t know how to make folders properly on here.
Once i made the folder the right way (after figuring out how to do so) the problem were gone.
It would help if you could post the full error like the original poster did above, then we can see exactly what file your code is trying to load, and what the error is.
If you have a public project name, that can be very helpful too, so we can check your code.
You might notice this thread is 2 years old – in future it’s best to start a new topic with your problem instead of posting in the older one