mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 12:11:11 +00:00
backport/fix(GuildDelete): disconnect voice and cleanup GuildChannels
This commit is contained in:
parent
96904b1826
commit
3df3741922
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.delete(channel.id);
|
||||||
|
if (guild.voiceConnection) guild.voiceConnection.disconnect();
|
||||||
|
|
||||||
// Delete guild
|
// Delete guild
|
||||||
client.guilds.delete(guild.id);
|
client.guilds.delete(guild.id);
|
||||||
this.deleted.set(guild.id, guild);
|
this.deleted.set(guild.id, guild);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue