Catching an error and sending custom error
I don't know if I have phrased the title well, but is it possible to filter an error and make it custom?
So what I mean is if I get an error
DiscordAPIError: Interaction has already been acknowledged.
, can i make is so the bot will send a custom error instead of 6 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!check what the error.message contains (it's a string) and use if or switch statements to handle it accordingly
also if you're using v13, upgrade, its deprecated
will this work?
Did you try it