Fix choices error
This commit is contained in:
parent
f174ad5e73
commit
95c7eca14c
1 changed files with 5 additions and 4 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Reference in a new issue