mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 17:21:59 +00:00
fix(GuildDelete): disconnect voice and cleanup GuildChannels (#2026)
This commit is contained in:
parent
69d84081d3
commit
fa3eee8fd9
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
// Delete guild
|
||||||
client.guilds.remove(guild.id);
|
client.guilds.remove(guild.id);
|
||||||
client.emit(Events.GUILD_DELETE, guild);
|
client.emit(Events.GUILD_DELETE, guild);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue