backport/fix(GuildDelete): disconnect voice and cleanup GuildChannels

This commit is contained in:
Pascal 2018-02-05 13:03:43 +01:00
parent 96904b1826
commit 3df3741922
No known key found for this signature in database
GPG key ID: 8C8A2E338661B871

View file

@ -28,6 +28,9 @@ class GuildDeleteAction extends Action {
};
}
for (const channel of guild.channels.values()) this.client.channels.delete(channel.id);
if (guild.voiceConnection) guild.voiceConnection.disconnect();
// Delete guild
client.guilds.delete(guild.id);
this.deleted.set(guild.id, guild);