what do i do yall???
ik this is some kind of connection error, it happened when i tried starting my bot, but how do i fix it?
heres my index.js code btw:

11 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffThis appears to be an improper handling of asynchronous code. I don’t think it has anything to do with your index.ts. Unfortunately without more details there’s not much we can do to help.
what details do u need
Well for start, explain what you were changing before and after the issue cropped up. Is this a new project you’re trying to setup? What troubleshooting steps have you taken?
this is completely new, i havent done any tests before this happened so this is was the first thing in my terminal
and i haven't taken any troubleshooting steps
Okay, so your setup is wrong. I suggest that you go take a look at the guide and go through it with a fine tooth comb. Chances are you have some method you’re calling that isn’t being awaited. You can also try wrapping your code with try-catch to see if you can get more specific details. Try setting console logs throughout your code to find when it is breaking, and finally use breakpoints and step through till you find it.
aight bet
thanks
sorry but how do i set up a try-catch?
My dude, google is your friend. Part of being a programmer is being able to ask REALLY REALLY good questions.
ohk
Resources to understand Promise:
- MDN: learn more
- Guide: learn more
- JavaScript info: learn more
and that error is indeed a network issue and nothing djs can do abour