1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 01:20:48 +00:00

additional error logging and debugging.

This commit is contained in:
MatteZ02
2020-06-22 00:41:30 +03:00
parent 70316495f5
commit 2d7752d2cf
18 changed files with 126 additions and 87 deletions

View File

@ -1,22 +1,24 @@
module.exports = async function (client, reason, guild) {
const queue = client.queue.get(guild.id);
queue.playing = false;
if (reason === "seek") {
return (queue.playing = true);
}
if (!queue.songLooping) {
if (queue.looping) {
queue.songs.push(queue.songs[0]);
module.exports = {
async execute(client, guild) {
const queue = client.queue.get(guild.id);
queue.playing = false;
if (queue.endReason === "seek") {
return (queue.playing = true);
}
queue.time = 0;
queue.votes = 0;
queue.voters = [];
if (reason !== "replay") {
if (reason === "previous") queue.songs.unshift(queue.prevSongs.pop())
if (reason !== "previous") queue.prevSongs.push(queue.songs.shift());
if (!queue.songLooping) {
if (queue.looping) {
queue.songs.push(queue.songs[0]);
}
queue.time = 0;
queue.votes = 0;
queue.voters = [];
if (queue.endReason !== "replay") {
if (queue.endReason === "previous") queue.songs.unshift(queue.prevSongs.pop())
if (queue.endReason !== "previous") queue.prevSongs.push(queue.songs.shift());
}
}
}
client.funcs.play(guild, queue.songs[0], client, 0, true);
client.funcs.play(guild, queue.songs[0], client, 0, true);
},
};