diff options
author | 2024-05-23 19:45:13 +0400 | |
---|---|---|
committer | 2024-05-23 19:45:13 +0400 | |
commit | 77c62f40303bb497b300bf46644e1c771cf0f214 (patch) | |
tree | d0bec077c9475696e3618e4bbf31b6cf1515e7e1 | |
parent | Don't upload to pastebin when no truncation (diff) |
Adjust truncation for 11 lines
-rw-r--r-- | bot/exts/utils/snekbox/_cog.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/utils/snekbox/_cog.py b/bot/exts/utils/snekbox/_cog.py index 71d36e141..33e38ba1b 100644 --- a/bot/exts/utils/snekbox/_cog.py +++ b/bot/exts/utils/snekbox/_cog.py @@ -272,7 +272,10 @@ class Snekbox(Cog): if len(lines) > max_lines: truncated = True - lines = lines[:max_lines] + if len(lines) == max_lines + 1: + lines = lines[:max_lines - 1] + else: + lines = lines[:max_lines] output = "\n".join(lines) if len(output) >= max_chars: output = f"{output[:max_chars]}\n... (truncated - too long, too many lines)" |