aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leandro Vandari <[email protected]>2025-03-20 06:36:27 -0300
committerGravatar GitHub <[email protected]>2025-03-20 06:36:27 -0300
commit3e75e1f89b1539c55424621da87813b35196b39d (patch)
treef467a7cbe8de7d12ab7f2d665adf8ee8bb38d0b1
parentAllows for slicing without a specified end index (e.g. "1:" will return all l... (diff)
Update end index display when slicing in the zen command
Co-authored-by: Vivek Ashokkumar <[email protected]>
-rw-r--r--bot/exts/utils/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/utils/utils.py b/bot/exts/utils/utils.py
index e1443ee66..1bd5c500b 100644
--- a/bot/exts/utils/utils.py
+++ b/bot/exts/utils/utils.py
@@ -133,7 +133,7 @@ class Utils(Cog):
if not (start_index % len(zen_lines) < end_index % (len(zen_lines) + 1)):
raise BadArgument("The start index for the slice must be smaller than the end index.")
- embed.title += f" (lines {start_index%len(zen_lines)}-{end_index%len(zen_lines)}):"
+ embed.title += f" (lines {start_index%len(zen_lines)}-{(end_index-1)%len(zen_lines)}):"
embed.description = "\n".join(zen_lines[start_index:end_index])
await ctx.send(embed=embed)
return