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
1 changed files with 3 additions and 0 deletions

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!');