2020-02-05 20:02:53 +00:00
|
|
|
module.exports = async function (client, reason, guild) {
|
|
|
|
const serverQueue = client.queue.get(guild.id);
|
|
|
|
serverQueue.playing = false;
|
2020-03-04 20:27:14 +00:00
|
|
|
if (reason === "seek") {
|
2020-02-05 20:02:53 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!serverQueue.songLooping) {
|
|
|
|
if (serverQueue.looping) {
|
|
|
|
serverQueue.songs.push(serverQueue.songs[0]);
|
|
|
|
}
|
2020-03-04 20:27:14 +00:00
|
|
|
|
2020-02-12 19:38:48 +00:00
|
|
|
serverQueue.votes = 0;
|
|
|
|
serverQueue.voters = [];
|
2020-02-05 20:02:53 +00:00
|
|
|
serverQueue.songs.shift();
|
|
|
|
}
|
|
|
|
client.funcs.play(guild, serverQueue.songs[0], client, 0, true);
|
|
|
|
};
|