We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c948b0 commit 05d31e5Copy full SHA for 05d31e5
discord/commands/commands.py
@@ -586,9 +586,9 @@ def __init__(
586
self.min_value: minmax_typehint = kwargs.pop("min_value", None)
587
self.max_value: minmax_typehint = kwargs.pop("max_value", None)
588
589
- if not isinstance(self.min_value, minmax_types):
+ if not (isinstance(self.min_value, minmax_types) or self.min_value is None):
590
raise TypeError(f"Expected {minmax_typehint} for min_value, got \"{type(self.min_value).__name__}\"")
591
- if not isinstance(self.max_value, minmax_types):
+ if not (isinstance(self.max_value, minmax_types) or self.min_value is None):
592
raise TypeError(f"Expected {minmax_typehint} for max_value, got \"{type(self.max_value).__name__}\"")
593
594
def to_dict(self) -> Dict:
0 commit comments