From 95c7eca14c596aa578350d1b69513fbcb4af2703 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sat, 3 Jul 2021 17:23:50 -0600 Subject: [PATCH] Fix choices error --- jarvis/cogs/admin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jarvis/cogs/admin.py b/jarvis/cogs/admin.py index 5140b02..15599da 100644 --- a/jarvis/cogs/admin.py +++ b/jarvis/cogs/admin.py @@ -276,19 +276,20 @@ class AdminCog(commands.Cog): create_option( name="active", description="Active bans", - option_type=5, + option_type=4, required=False, choices=[ - create_choice(value=True, name="Yes"), - create_choice(value=False, name="No"), + create_choice(value=1, name="Yes"), + create_choice(value=0, name="No"), ], ), ], ) @admin_or_permissions(ban_members=True) async def _bans_list( - self, ctx: SlashContext, type: int = 0, active: bool = True + self, ctx: SlashContext, type: int = 0, active: int = 1 ): + active = bool(active) ctx.defer() types = [0, "perm", "temp", "soft"] search = {"guild": ctx.guild.id, "active": active}