Skip to content

Commit 22461a2

Browse files
LulalabyPaillat-dev
authored andcommitted
fix: usage of SlashCommandOptionType since its a subclass of tuple (Pycord-Development#2901)
1 parent cbe39f7 commit 22461a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord/commands/options.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ def __init__(self, input_type: InputType = str, /, description: str | None = Non
333333

334334
@staticmethod
335335
def _strip_none_type(input_type):
336+
if isinstance(input_type, SlashCommandOptionType):
337+
return input_type
338+
336339
if input_type is type(None):
337340
raise TypeError("Option type cannot be only NoneType")
338341

0 commit comments

Comments
 (0)