From 62f9775932d4ff234fb1a6e998a2d5a11c387dbb Mon Sep 17 00:00:00 2001 From: Nathan Alex Date: Thu, 6 Apr 2023 18:55:24 -0400 Subject: [PATCH] Fixed wrong event handler. Updated `client.on('warn'...);` as I misspelled it as `error`. Additionally updated it so it does not close the process when a warning occurs. --- index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.ts b/index.ts index 4eb228d4de0e5c21f74909a95c5a89e8334dd157..9742b52b6e4dab243016883e720850e4a52e3d76 100644 --- a/index.ts +++ b/index.ts @@ -221,13 +221,10 @@ client.on('invalidated', function () { }); // Client warning handler (which might not require restarting but just to be safe.) -client.on('error', function (info) { +client.on('warn', function (info) { // Writes a log of what happened to a log file. fs.writeFileSync( path.join('logs', `${Date.now()}.warn`), `Warning: ${info}` ); - - // Exits the process (and hopefully restarts!) - process.exit(); }); -- 2.54.0