This commit is contained in:
Lukáš H 2020-04-22 09:53:55 +02:00
parent e7ed288139
commit 3956eb6fae
No known key found for this signature in database
GPG key ID: E07D6630DBC17195

View file

@ -16,6 +16,9 @@ module.exports = (client, oldState, newState) => {
if(guild.voiceChannel.members.size == 1 && guild.autoDisconnect) {
setTimeout(() => {
if(guild.voiceChannel.members.size == 1 && guild.autoDisconnect) {
guild.playing = false;
guild.queue = [];
// Probably should be async? But no need here I think
guild.dispatcher.end('silent');
guild.message.channel.send('No one is listening to me. Leaving voice chat!');