Skip to content

Commit

Permalink
Merge pull request #1535 from francisdbillones/patch-1
Browse files Browse the repository at this point in the history
Fix zen's negative indexing
  • Loading branch information
mbaruh committed Apr 20, 2021
2 parents cd30a39 + 757826d commit 2e45658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/exts/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def zen(self, ctx: Context, *, search_value: Union[int, str, None] = None)
# 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}.")

Expand Down

0 comments on commit 2e45658

Please sign in to comment.