🐛 Check if the bot is in a channel

Closes #253
This commit is contained in:
Androz2091 2021-02-18 23:20:14 +01:00
parent 4a75dae262
commit 42e84271c2

View file

@ -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