Merge branch 'ban_fix' into 'main'

Fix ban

See merge request stark-industries/j.a.r.v.i.s.!38
This commit is contained in:
Zeva Rose 2022-02-01 23:05:09 +00:00
commit dd3cc69394

View file

@ -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