Skip to content

Commit 05d31e5

Browse files
authored
more bug fixes
1 parent 0c948b0 commit 05d31e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/commands/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,9 @@ def __init__(
586586
self.min_value: minmax_typehint = kwargs.pop("min_value", None)
587587
self.max_value: minmax_typehint = kwargs.pop("max_value", None)
588588

589-
if not isinstance(self.min_value, minmax_types):
589+
if not (isinstance(self.min_value, minmax_types) or self.min_value is None):
590590
raise TypeError(f"Expected {minmax_typehint} for min_value, got \"{type(self.min_value).__name__}\"")
591-
if not isinstance(self.max_value, minmax_types):
591+
if not (isinstance(self.max_value, minmax_types) or self.min_value is None):
592592
raise TypeError(f"Expected {minmax_typehint} for max_value, got \"{type(self.max_value).__name__}\"")
593593

594594
def to_dict(self) -> Dict:

0 commit comments

Comments
 (0)