diff --git a/index.js b/index.js index b26a0cb..8ce83c0 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,9 @@ bot.use( require("./components/subscribe/index") ); -bot.launch().catch((err) => { - console.log(err); +bot.launch(); + +// catch error +process.on("unhandledRejection", (error) => { + console.error(error); });