Fix choices error

This commit is contained in:
Zeva Rose 2021-07-03 17:23:50 -06:00
parent f174ad5e73
commit 95c7eca14c

View file

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