tweak error handling
This commit is contained in:
parent
0ec27d1f29
commit
7915d16671
@ -1,6 +1,5 @@
|
||||
process.on('uncaughtException', console.error);
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
console.error(promise);
|
||||
process.on('unhandledRejection', (error) => {
|
||||
console.error(error.stack);
|
||||
});
|
||||
|
||||
global.Discord = require('discord.js');
|
||||
@ -9,7 +8,7 @@ global.colors = require('colors');
|
||||
|
||||
global.client = new Discord.Client({disableEveryone:true});
|
||||
client.on('warn', console.warn);
|
||||
client.on('error', console.error);
|
||||
client.on('error', error => console.error(error.stack));
|
||||
|
||||
global.config = require('./config.json');
|
||||
client.login(config.token);
|
||||
|
Loading…
x
Reference in New Issue
Block a user