Is there anything native to Sapphire that allows error handling?
I want to capture all the bot's unhandled errors and to be able to act on them.
Thanks!
Solution
That error will land at
chatInputRunError
chatInputRunError
/
contextMenuRunError
contextMenuRunError
/
messageRunError
messageRunError
which is the highest level catch all event for commands.
NodeJS, or at least Discord bots, do not have some kind of error context that's a try/catch for everything. Errors for backend services are also different than frontend. For frontend you dont ever want to throw the user in an error state because they will see it and it disrupts their user experience, however, for backend errors they will end up in the logging at the worst and the application will remaining running