diff --git a/src/main.js b/src/main.js index 492a86c..09001ea 100755 --- a/src/main.js +++ b/src/main.js @@ -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);