2020-06-16 18:51:11 +00:00
|
|
|
const MusicClient = require("./struct/client.js");
|
|
|
|
const DiscordWebhook = require("discord-webhook-node");
|
|
|
|
const client = new MusicClient({});
|
|
|
|
const webhookClient = new DiscordWebhook.Webhook(client.config.webhookUrl);
|
|
|
|
|
|
|
|
const oldConsole = {};
|
|
|
|
oldConsole.log = console.log;
|
|
|
|
console.log = function (arg) {
|
|
|
|
oldConsole.log(arg);
|
2020-06-29 17:48:42 +00:00
|
|
|
if (!client.config.devMode && arg)
|
|
|
|
webhookClient.send(JSON.stringify(arg));
|
2020-06-16 18:51:11 +00:00
|
|
|
};
|
2020-06-21 21:41:30 +00:00
|
|
|
|
|
|
|
oldConsole.error = console.error;
|
|
|
|
console.error = function (arg) {
|
|
|
|
oldConsole.error(arg);
|
2020-06-29 17:48:42 +00:00
|
|
|
if (!client.config.devMode && arg)
|
|
|
|
webhookClient.send(JSON.stringify(arg));
|
2020-06-21 21:41:30 +00:00
|
|
|
};
|