mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 19:23:18 +00:00
18 lines
594 B
JavaScript
18 lines
594 B
JavaScript
|
module.exports = async function (client, reason, guild) {
|
||
|
const serverQueue = client.queue.get(guild.id);
|
||
|
serverQueue.playing = false;
|
||
|
if (reason === "Stream is not generating quickly enough.") {
|
||
|
console.log("Song ended");
|
||
|
} else if (reason === "seek") {
|
||
|
return;
|
||
|
} else {
|
||
|
console.log(reason);
|
||
|
}
|
||
|
if (!serverQueue.songLooping) {
|
||
|
if (serverQueue.looping) {
|
||
|
serverQueue.songs.push(serverQueue.songs[0]);
|
||
|
}
|
||
|
serverQueue.songs.shift();
|
||
|
}
|
||
|
client.funcs.play(guild, serverQueue.songs[0], client, 0, true);
|
||
|
};
|