Update sherlock command

This commit is contained in:
Nexus 2023-06-03 15:01:21 +01:00
parent 9ecef10e08
commit 66a03121bf
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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(),
),
)