Setting up try catch for TypeError's
Hello I am trying to setup a try catch for errors caused when the code interaction.reply() is ran. But it seems like the try catch statement isn't being caught.
Btw, I purposely ran code which would give an error. I just want this error to be caught because my bot is crashing everytime an error like this happens.
4 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 OPStack Trace
Code block
you need to await the promises in the try block for the catch to work
ah oke
ty
Lemme try