From eb4e07b8cc29ec849a9e5e2b431812332366263b Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Fri, 18 Nov 2022 15:57:30 +0700 Subject: [PATCH] (node:126946) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index ec15693..8fdc63b 100644 --- a/bot.js +++ b/bot.js @@ -184,7 +184,7 @@ async function createBot(server, config, getBots, dcclient) { bot._client.on('error', function() {}); - process.on('uncaughtException', (error) => { + process.once('uncaughtException', (error) => { console.error('uncaught ' + util.inspect(error)); // channel.send('uncaught ```\n' + util.inspect(error) + '\n```'); // bot.emit('end', 'uncaughtException', 'process: uncaughtException');