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:
commit
dd3cc69394
1 changed files with 4 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue