Skip to content

Commit

Permalink
fix disnake 2.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
eibex committed Nov 18, 2023
1 parent 63e5d84 commit 57ecb55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cogs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, bot):
async def admin(
self,
inter,
action: str = commands.Param(description=static_response.get("admin-option-action"), choices=("add", "remove", "list")),
action: str = commands.Param(description=static_response.get("admin-option-action"), choices={"add", "remove", "list"}),
role: disnake.Role = commands.Param(description=static_response.get("admin-option-role"), default=None),
):
await inter.response.defer()
Expand Down
2 changes: 1 addition & 1 deletion cogs/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async def edit_reaction(
inter,
channel: disnake.TextChannel = commands.Param(description=static_response.get("message-reaction-option-channel")),
action: str = commands.Param(
description=static_response.get("message-reaction-option-action"), choices=("add", "remove")
description=static_response.get("message-reaction-option-action"), choices={"add", "remove"}
),
number: int = commands.Param(description=static_response.get("message-reaction-option-number")),
reaction: str = commands.Param(description=static_response.get("message-reaction-option-reaction"), default=None),
Expand Down
6 changes: 3 additions & 3 deletions cogs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async def set_systemchannel(
self,
inter,
channel_type: str = commands.Param(
description=static_response.get("settings-systemchannel-option-type"), choices=("main", "server", "explanation")
description=static_response.get("settings-systemchannel-option-type"), choices={"main", "server", "explanation"}
),
channel: disnake.TextChannel = commands.Param(
description=static_response.get("settings-systemchannel-option-channel"), default=None
Expand Down Expand Up @@ -129,7 +129,7 @@ async def set_language(
self,
inter,
_range: str = commands.Param(
name="range", description=static_response.get("settings-language-option-range"), choices=("global", "server")
name="range", description=static_response.get("settings-language-option-range"), choices={"global", "server"}
),
language: str = commands.Param(
description=static_response.get("settings-language-option-language"), choices=static_response.languages()
Expand Down Expand Up @@ -180,7 +180,7 @@ async def change_activity(
self,
inter,
action: str = commands.Param(
description=static_response.get("settings-activity-option-action"), choices=("add", "remove", "list")
description=static_response.get("settings-activity-option-action"), choices={"add", "remove", "list"}
),
activity: str = commands.Param(description=static_response.get("settings-activity-option-activity"), default=None),
):
Expand Down

0 comments on commit 57ecb55

Please sign in to comment.