mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 17:43:38 +00:00
Init
This commit is contained in:
20
events/dispatcher/finish.js
Normal file
20
events/dispatcher/finish.js
Normal file
@ -0,0 +1,20 @@
|
||||
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);
|
||||
};
|
Reference in New Issue
Block a user