mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 10:40:49 +00:00
Fix code to work on this decade 1/x
This commit is contained in:
@ -1,19 +1,14 @@
|
||||
const MusicClient = require("./struct/client.js");
|
||||
const MusicClient = require("./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);
|
||||
if (!client.config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
||||
|
||||
oldConsole.error = console.error;
|
||||
console.error = function (arg) {
|
||||
oldConsole.error(arg);
|
||||
if (!client.config.devMode && arg)
|
||||
webhookClient.send(JSON.stringify(arg));
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user