From 0650e033d8571b52db27bbd4f7a724acd21f54fa Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sat, 24 Jul 2021 21:04:52 -0600 Subject: [PATCH] Fix caching error in /bans list, closes #68 --- jarvis/cogs/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jarvis/cogs/admin.py b/jarvis/cogs/admin.py index ac68e94..58e8a74 100644 --- a/jarvis/cogs/admin.py +++ b/jarvis/cogs/admin.py @@ -342,7 +342,8 @@ class AdminCog(commands.Cog): async def _bans_list( self, ctx: SlashContext, type: int = 0, active: int = 1 ): - exists = self.check_cache(ctx, type=type) + active = bool(active) + exists = self.check_cache(ctx, type=type, active=active) if exists: await ctx.defer(hidden=True) await ctx.send( @@ -351,7 +352,6 @@ class AdminCog(commands.Cog): hidden=True, ) return - active = bool(active) types = [0, "perm", "temp", "soft"] search = {"guild": ctx.guild.id} if active: @@ -435,6 +435,7 @@ class AdminCog(commands.Cog): "timeout": datetime.utcnow() + timedelta(minutes=5), "command": ctx.subcommand_name, "type": type, + "active": active, "paginator": paginator, }