move uncaught to index

This commit is contained in:
ChomeNS 2022-11-18 16:14:13 +07:00
parent eb4e07b8cc
commit a0e6c90ef3
2 changed files with 4 additions and 6 deletions

6
bot.js
View file

@ -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;
};

View file

@ -29,3 +29,7 @@ dcclient.on('ready', () => {
});
dcclient.login(config.discord.token);
process.on('uncaughtException', (error) => {
console.log(error);
});