From 42e84271c268daa3197b8cdfdafd4965159f084d Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 18 Feb 2021 23:20:14 +0100 Subject: [PATCH] :bug: Check if the bot is in a channel Closes #253 --- src/Player.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Player.js b/src/Player.js index 6ae6bc4..fec1e81 100644 --- a/src/Player.js +++ b/src/Player.js @@ -1056,6 +1056,8 @@ class Player extends EventEmitter { this.emit('botDisconnect', queue.firstMessage) } + // check if the bot is in a channel + if (!queue.voiceConnection || !queue.voiceConnection.channel) return // process leaveOnEmpty checks if (!this.options.leaveOnEmpty) return // If the member joins a voice channel