Errors in a discord bot


I tried uploading a bot to Glitch and I keep getting many errors in my log, one of them being: (node:25729) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) I’m kind of a noob to Glitch, can anyone help me out?


You’ll need to provide more info for us to be able to look into the source of that issue as it’s just a generic error message saying you don’t have a catch block to catch any error. If you can provide the file and line number it’s reporting the error for, along with a link to your project then we can be more helpful.

However, a common place we see that error is around client.login() if your token isn’t correct.


Check your token check if it code is correct