diff options
author | 2021-04-20 22:16:56 +0300 | |
---|---|---|
committer | 2021-04-20 22:16:56 +0300 | |
commit | 2e456588fdcdf6286636a86d4083f43b62b1f995 (patch) | |
tree | e1303269b8cdc33b9b9d6e9401e4551569168200 | |
parent | Merge pull request #1543 from python-discord/test-async-mock (diff) | |
parent | Merge branch 'main' into patch-1 (diff) |
Merge pull request #1535 from francisdbillones/patch-1
Fix zen's negative indexing
-rw-r--r-- | bot/exts/utils/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/utils/utils.py b/bot/exts/utils/utils.py index 8d9d27c64..4c39a7c2a 100644 --- a/bot/exts/utils/utils.py +++ b/bot/exts/utils/utils.py @@ -109,7 +109,7 @@ class Utils(Cog): # handle if it's an index int if isinstance(search_value, int): upper_bound = len(zen_lines) - 1 - lower_bound = -1 * upper_bound + lower_bound = -1 * len(zen_lines) if not (lower_bound <= search_value <= upper_bound): raise BadArgument(f"Please provide an index between {lower_bound} and {upper_bound}.") |