diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py index 0bf742c708..e94429108f 100644 --- a/discord/ui/input_text.py +++ b/discord/ui/input_text.py @@ -153,7 +153,7 @@ def min_length(self) -> Optional[int]: def min_length(self, value: Optional[int]): if value and not isinstance(value, int): raise TypeError(f"min_length must be None or int not {value.__class__.__name__}") # type: ignore - if 0 <= value <= 4000: + if value < 0 or value > 4000: raise ValueError("min_length must be between 0 and 4000") self._underlying.min_length = value @@ -166,7 +166,7 @@ def max_length(self) -> Optional[int]: def max_length(self, value: Optional[int]): if value and not isinstance(value, int): raise TypeError(f"min_length must be None or int not {value.__class__.__name__}") # type: ignore - if 0 < value <= 4000: + if value <= 0 or value > 4000: raise ValueError("max_length must be between 1 and 4000") self._underlying.max_length = value