diff --git a/bot.js b/bot.js index 8fdc63b..f0ae233 100644 --- a/bot.js +++ b/bot.js @@ -184,12 +184,6 @@ async function createBot(server, config, getBots, dcclient) { bot._client.on('error', function() {}); - process.once('uncaughtException', (error) => { - console.error('uncaught ' + util.inspect(error)); - // channel.send('uncaught ```\n' + util.inspect(error) + '\n```'); - // bot.emit('end', 'uncaughtException', 'process: uncaughtException'); - }); - return bot; }; diff --git a/index.js b/index.js index 7341e49..54aedc0 100644 --- a/index.js +++ b/index.js @@ -29,3 +29,7 @@ dcclient.on('ready', () => { }); dcclient.login(config.discord.token); + +process.on('uncaughtException', (error) => { + console.log(error); +});