fix(GuildDelete): disconnect voice and cleanup GuildChannels (#2026)

This commit is contained in:
SpaceEEC
2017-10-19 07:03:02 +02:00
committed by Crawl
parent 69d84081d3
commit fa3eee8fd9

View File

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