antoinemcx / Structure-Discord-Bot

🚀 Command, slash command & event handler - Discord Bot Template (v14)
https://discord.gg/G6WQsMQShZ
MIT License
86 stars 10 forks source link

Better error handling #4

Closed roogue closed 2 years ago

roogue commented 2 years ago

At ./src/event/messageCreate.js line 44, I was found that you are using try-catch to handle exceptions thrown asynchronously.

At ./src/event/messageCreate.js line 47, you emitted an error event, but you didn't listen to it.

At ./src/utils/handlers/error.js, the unhandledRejection part, err is not always an instance of Error.

I did not make too much changes as I want to maintain the current structure as much as I can. I hope this is helpful :P