mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(GuildDelete): disconnect voice and cleanup GuildChannels (#2026)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user