1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-17 01:16:00 +00:00

Updated multiple things

This commit is contained in:
MatteZ02
2020-03-14 18:38:02 +02:00
parent ed1322cff6
commit 4a76582f76
31 changed files with 171 additions and 170 deletions

View File

@ -0,0 +1,13 @@
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);
};

View File

@ -1,17 +1,17 @@
module.exports = async function (client, reason, guild) {
const serverQueue = client.queue.get(guild.id);
serverQueue.playing = false;
const queue = client.queue.get(guild.id);
queue.playing = false;
if (reason === "seek") {
return;
}
if (!serverQueue.songLooping) {
if (serverQueue.looping) {
serverQueue.songs.push(serverQueue.songs[0]);
if (!queue.songLooping) {
if (queue.looping) {
queue.songs.push(queue.songs[0]);
}
serverQueue.votes = 0;
serverQueue.voters = [];
serverQueue.songs.shift();
queue.votes = 0;
queue.voters = [];
queue.songs.shift();
}
client.funcs.play(guild, serverQueue.songs[0], client, 0, true);
client.funcs.play(guild, queue.songs[0], client, 0, true);
};