rm dat discord console sheit

This commit is contained in:
Lamp 2018-07-13 16:37:15 -07:00
parent 084de94694
commit 2fd27fc5f1
No known key found for this signature in database
GPG Key ID: 0F1F8704BEDE369E
1 changed files with 0 additions and 20 deletions

View File

@ -5,26 +5,6 @@ global.fs = require('fs');
global.config = require('./config');
global.dClient = new Discord.Client({ disableEveryone: true });
console._log = console.log;
console.log = function(){
console._log.apply(console, arguments);
log2discord(arguments);
}
console._error = console.error;
console.error = function(){
console._error.apply(console, arguments);
log2discord(arguments);
}
console.warn = console.error;
console.info = console.log;
var webhook = new Discord.WebhookClient(config.webhooks.console[0], config.webhooks.console[1]);
function log2discord(str){
str = Array.from(str);
str = str.map(require('util').inspect);
str = str.join(' ');
webhook.send(str, {split:{char:''}});
}
process.on('unhandledRejection', (reason, promise) => {
console.error(promise);