diff --git a/plugins/music.js b/plugins/music.js index adb3df1..d7bf3a0 100644 --- a/plugins/music.js +++ b/plugins/music.js @@ -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); });