fix(ChannelManager): Remove threads from cache upon deletion (#10883)

* fix(ChannelManager): remove threads from cache upon deletion

* refactor: loop over thread ids

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jiralite
2025-05-09 12:06:35 +01:00
committed by GitHub
parent c4cd6ea637
commit 4f6fedfb1f

View File

@@ -73,6 +73,13 @@ class ChannelManager extends CachedManager {
channel?.parent?.threads?.cache.delete(id);
this.cache.delete(id);
if (channel?.threads) {
for (const threadId of channel.threads.cache.keys()) {
this.cache.delete(threadId);
channel.guild?.channels.cache.delete(threadId);
}
}
}
/**