From 66a03121bf7947bccc657b078322b5cf03e32e52 Mon Sep 17 00:00:00 2001 From: nex Date: Sat, 3 Jun 2023 15:01:21 +0100 Subject: [PATCH] Update sherlock command --- cogs/other.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cogs/other.py b/cogs/other.py index cd73f11..ba51456 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1611,10 +1611,20 @@ class OtherCog(commands.Cog): ) ) # If it didn't error, send the results + stdout = stdout.decode() + if len(stdout) > 4000: + paginator = commands.Paginator("```ansi", max_size=4000) + for line in stdout.splitlines(): + paginator.add_line(line) + desc = paginator.pages[0] + title = "Results (truncated)" + else: + desc = f"```ansi\n{stdout}```" + title = "Results" await ctx.edit( embed=discord.Embed( - title="Results", - description=f"```ansi\n{stdout.decode()[:4000]}```", + title=title, + description=desc, colour=discord.Colour.green(), ), )