mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:00:18 +00:00
20 lines
598 B
JavaScript
20 lines
598 B
JavaScript
|
module.exports = async function (client, reason, guild) {
|
||
|
const radio = client.radio.get(guild.id);
|
||
|
radio.playing = false;
|
||
|
if (reason === "Stream is not generating quickly enough.") {
|
||
|
console.log("Song ended");
|
||
|
} else if (reason === "seek") {
|
||
|
return;
|
||
|
} else {
|
||
|
console.log(reason);
|
||
|
}
|
||
|
if (!radio.songLooping) {
|
||
|
if (radio.looping) {
|
||
|
radio.songs.push(radio.songs[0]);
|
||
|
}
|
||
|
radio.votes = 0;
|
||
|
radio.voters = [];
|
||
|
radio.songs.shift();
|
||
|
}
|
||
|
client.funcs.play(guild, radio.songs[0], client, 0, true);
|
||
|
};
|