From ef7c90777b7db274d40e5e1bd418c69eb558160c Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Mon, 20 Apr 2020 20:47:25 +0200 Subject: [PATCH] fix: check if repeat mode is enabled before disconnecting Closes #15 --- src/Player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index 4c70516..a4d8d13 100644 --- a/src/Player.js +++ b/src/Player.js @@ -322,7 +322,7 @@ class Player { // Gets guild queue let queue = this.queues.find((g) => g.guildID === guildID); // If there isn't any music in the queue - if(queue.songs.length < 2 && !firstPlay){ + if(queue.songs.length < 2 && !firstPlay && !queue.repeatMode){ // Leaves the voice channel if(this.options.leaveOnEnd && !queue.stopped) queue.connection.channel.leave(); // Remoces the guild from the guilds list