Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/discord.js/src/managers/ChannelManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ class ChannelManager extends CachedManager {

channel?.parent?.threads?.cache.delete(id);
this.cache.delete(id);

if (channel?.threads) {
for (const cacheChannelId of this.cache.keys()) {
if (channel.threads.cache.has(cacheChannelId)) {
this.cache.delete(cacheChannelId);
channel.guild?.channels.cache.delete(cacheChannelId);
}
}
}
}

/**
Expand Down