aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-07-02 19:55:57 +0100
committerGravatar Gareth Coles <[email protected]>2018-07-02 19:55:57 +0100
commit650de15d5ec28fdc2cf46d300ae49baf549cab56 (patch)
tree8ef7dacc5eda1302fb46e711274af571c486e3a0
parent[Snekbox] Truncate output if there's too many lines (diff)
[Snekbox] Stricter truncation
-rw-r--r--bot/cogs/snekbox.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py
index 9fbebbaa0..41d111961 100644
--- a/bot/cogs/snekbox.py
+++ b/bot/cogs/snekbox.py
@@ -76,13 +76,13 @@ class Snekbox:
if output.count("\n") > 10:
output = "\n".join(output.split("\n")[:10])
- if len(output) >= 1900:
- output = f"{output[:1900]}\n... (truncated)"
+ if len(output) >= 1000:
+ output = f"{output[:1000]}\n... (truncated - too long, too many lines)"
else:
- output = f"{output}\n... (truncated)"
+ output = f"{output}\n... (truncated - too many lines)"
- elif len(output) >= 1900:
- output = f"{output[:1900]}\n... (truncated)"
+ elif len(output) >= 1000:
+ output = f"{output[:1000]}\n... (truncated - too long)"
await ctx.send(
f"{ctx.author.mention} Your eval job has completed.\n\n```\n{output}\n```"