Skip to content

Commit fcee9ea

Browse files
Fix #404
1 parent 3d1fe25 commit fcee9ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

discord/commands/commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,11 @@ def __init__(
625625
for o in kwargs.pop("choices", list())
626626
]
627627
self.default = kwargs.pop("default", None)
628+
628629
if self.input_type == SlashCommandOptionType.integer:
629-
minmax_types = (int,)
630+
minmax_types = (int, type(None))
630631
elif self.input_type == SlashCommandOptionType.number:
631-
minmax_types = (int, float)
632+
minmax_types = (int, float, type(None))
632633
else:
633634
minmax_types = (type(None),)
634635
minmax_typehint = Optional[Union[minmax_types]] # type: ignore

0 commit comments

Comments
 (0)