1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-13 02:20:18 +00:00
musix-oss/events/dispatcher/error.js

13 lines
617 B
JavaScript
Raw Normal View History

2020-03-14 16:38:02 +00:00
module.exports = async function (client, error, guild) {
const queue = client.queue.get(guild.id);
console.error(error);
/*if (error = "Error: input stream: This video contains content from WMG, who has blocked it on copyright grounds.") {
queue.endReason = "skip";
queue.connection.dispatcher.end();
return queue.textChannel.send(client.messages.songBlockedWMG);
}*/
client.debug_channel.send(client.messages.dispatcherError + error);
queue.voiceChannel.leave();
client.queue.delete(guild.id);
return queue.textChannel.send(client.messages.errorDispatcher);
};