feat: clean webhook cache upon leaving guild

This commit is contained in:
sam 2024-11-08 19:39:36 +01:00
parent 2deac26fc8
commit 492283b9c1
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
4 changed files with 35 additions and 10 deletions

View file

@ -130,14 +130,6 @@ public partial class GuildsController
guildId
);
// Clear out the caches for this guild
guildCache.Remove(guildId, out _);
emojiCache.Remove(guildId);
channelCache.RemoveGuild(guildId);
roleCache.RemoveGuild(guildId);
await memberCache.RemoveAllMembersAsync(guildId);
await inviteCache.RemoveAsync(guildId);
_logger.Information("Left guild {GuildId} and removed all data for it", guildId);
return Ok(export);