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