mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
Invalidate cache in filter clear commands
This commit is contained in:
@@ -171,6 +171,7 @@ class Filter(commands.Cog):
|
|||||||
return
|
return
|
||||||
if pred.result:
|
if pred.result:
|
||||||
await self.config.guild(guild).filter.clear()
|
await self.config.guild(guild).filter.clear()
|
||||||
|
self.invalidate_cache(guild)
|
||||||
await ctx.send(_("Server filter cleared."))
|
await ctx.send(_("Server filter cleared."))
|
||||||
else:
|
else:
|
||||||
await ctx.send(_("No changes have been made."))
|
await ctx.send(_("No changes have been made."))
|
||||||
@@ -219,6 +220,7 @@ class Filter(commands.Cog):
|
|||||||
return
|
return
|
||||||
if pred.result:
|
if pred.result:
|
||||||
await self.config.channel(channel).filter.clear()
|
await self.config.channel(channel).filter.clear()
|
||||||
|
self.invalidate_cache(ctx.guild, channel)
|
||||||
await ctx.send(_("Channel filter cleared."))
|
await ctx.send(_("Channel filter cleared."))
|
||||||
else:
|
else:
|
||||||
await ctx.send(_("No changes have been made."))
|
await ctx.send(_("No changes have been made."))
|
||||||
|
|||||||
Reference in New Issue
Block a user