i somehow broke music and fixed it

This commit is contained in:
ChomeNS 2022-11-17 09:07:29 +07:00
parent f078a5e056
commit 122f7e55bc

View file

@ -27,9 +27,9 @@ function inject(bot) {
bot.music.song = null;
bot.music.loop = 0;
bot.music.queue = [];
time = 0;
startTime = 0;
noteIndex = 0;
let time = 0;
let startTime = 0;
let noteIndex = 0;
bot.music.skip = function() {
if (bot.music.loop === 2) {
bot.music.queue.push(bot.music.queue.shift());
@ -75,12 +75,10 @@ function inject(bot) {
}
}
}
} catch (e) {
return;
}
}, 20);
} catch (e) {}
}, 50);
bot.on('end', () => {
bot.once('end', () => {
clearInterval(interval);
});