diff options
| -rw-r--r-- | bot/cogs/snekbox.py | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py index 4edba3539..7526c8bb7 100644 --- a/bot/cogs/snekbox.py +++ b/bot/cogs/snekbox.py @@ -56,11 +56,17 @@ class Snekbox:              async def callback(message: Message):                  output = message.body.decode() -                colour = Colour.red() +                colour = Colour.blurple()                  if "```" in output:                      output = "Code block escape attempt detected; will not output result"                      colour = Colour.red() +                else: +                    output = [f"{i} | {line}" for i, line in enumerate(output.split("\n"), start=1)] +                    output = "\n".join(output) + +                    if len(output) >= 2048: +                        output = f"{output[:2000]}... (truncated)"                  embed = Embed(description=f"```{output}```", title="Code evaluation", colour=colour)  |