1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-14 03:30:18 +00:00
musix-oss/src/bot.js
2020-06-29 19:09:31 +03:00

17 lines
549 B
JavaScript

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);
if (!client.config.devMode && arg) webhookClient.send(arg);
};
oldConsole.error = console.error;
console.error = function (arg) {
oldConsole.error(arg);
if (!client.config.devMode && arg) webhookClient.send(arg);
};