From df6be94fb32f58065b325d31f7afe7a8651168f5 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Wed, 24 Jun 2020 16:51:00 +0200 Subject: [PATCH] :bug: Fix skip method --- src/Player.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Player.js b/src/Player.js index adaabaa..96d4512 100644 --- a/src/Player.js +++ b/src/Player.js @@ -513,7 +513,7 @@ class Player { // Get guild queue const queue = this.queues.find((g) => g.guildID === guildID) if (!queue) return reject(new Error('Not playing')) - const currentTrack = queue.tracks[0] + const currentTrack = queue.playing // End the dispatcher queue.voiceConnection.dispatcher.end() queue.lastSkipped = true @@ -836,7 +836,7 @@ class Player { // Get guild queue const queue = this.queues.find((g) => g.guildID === guildID) // If there isn't any music in the queue - if (queue.tracks.length < 2 && !firstPlay && !queue.repeatMode) { + if (queue.tracks.length < 1 && !firstPlay && !queue.repeatMode) { // Leave the voice channel if (this.options.leaveOnEnd && !queue.stopped) queue.voiceConnection.channel.leave() // Remove the guild from the guilds list