From 3f4c8f902fc234434500318f572ff225359cca96 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Tue, 1 Feb 2022 16:04:31 -0700 Subject: [PATCH] Fix ban --- jarvis/cogs/admin/ban.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/jarvis/cogs/admin/ban.py b/jarvis/cogs/admin/ban.py index 828d9b3..646049d 100644 --- a/jarvis/cogs/admin/ban.py +++ b/jarvis/cogs/admin/ban.py @@ -109,9 +109,9 @@ class BanCog(CacheCog): option_type=3, required=False, choices=[ - create_choice(value=0, name="Permanent"), - create_choice(value=1, name="Temporary"), - create_choice(value=2, name="Soft"), + create_choice(value="perm", name="Permanent"), + create_choice(value="temp", name="Temporary"), + create_choice(value="soft", name="Soft"), ], ), create_option( @@ -128,15 +128,9 @@ class BanCog(CacheCog): ctx: SlashContext, user: User = None, reason: str = None, - btype: int = 0, + btype: str = "perm", duration: int = 4, ) -> None: - if btype == 0: - btype = "perm" - elif btype == 1: - btype = "temp" - else: - btype = "soft" if not user or user == ctx.author: await ctx.send("You cannot ban yourself.", hidden=True) return