From cc10969ccfe483084589c65830106664510b1c12 Mon Sep 17 00:00:00 2001 From: Slincnik Date: Tue, 14 Jan 2025 23:49:31 +0300 Subject: [PATCH] refactor: change logger func when called error, warn --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index b66b509c..e5746e7b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,7 @@ client.init(); client .on("disconnect", () => logger.warn("Bot disconnected.")) .on("reconnecting", () => logger.warn("Bot reconnecting...")) - .on("warn", logger.log) - .on("error", logger.log); + .on("warn", logger.warn) + .on("error", logger.error); -process.on("unhandledRejection", logger.log).on("uncaughtException", logger.log); +process.on("unhandledRejection", logger.error).on("uncaughtException", logger.error);