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(); });