[commands] Update Range examples to match app_commands.Range

This commit is contained in:
chrispy 2023-02-01 01:02:36 +11:00 committed by GitHub
parent 346ade168e
commit 774219acae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1067,6 +1067,8 @@ else:
- ``Range[int, 10]`` means the minimum is 10 with no maximum.
- ``Range[int, None, 10]`` means the maximum is 10 with no minimum.
- ``Range[int, 1, 10]`` means the minimum is 1 and the maximum is 10.
- ``Range[float, 1.0, 5.0]`` means the minimum is 1.0 and the maximum is 5.0.
- ``Range[str, 1, 10]`` means the minimum length is 1 and the maximum length is 10.
Inside a :class:`HybridCommand` this functions equivalently to :class:`discord.app_commands.Range`.