Invalidate cache in filter clear commands

This commit is contained in:
jack1142 2021-09-03 03:36:33 +02:00
parent 8880251749
commit 6d40de8da3
No known key found for this signature in database
GPG Key ID: 95A9D6BCDE5C1283

View File

@ -171,6 +171,7 @@ class Filter(commands.Cog):
return
if pred.result:
await self.config.guild(guild).filter.clear()
self.invalidate_cache(guild)
await ctx.send(_("Server filter cleared."))
else:
await ctx.send(_("No changes have been made."))
@ -219,6 +220,7 @@ class Filter(commands.Cog):
return
if pred.result:
await self.config.channel(channel).filter.clear()
self.invalidate_cache(ctx.guild, channel)
await ctx.send(_("Channel filter cleared."))
else:
await ctx.send(_("No changes have been made."))