Update sherlock command

This commit is contained in:
Nexus 2023-06-03 14:28:44 +01:00
parent e519ae6506
commit 210709acad
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1543,12 +1543,17 @@ class OtherCog(commands.Cog):
while True: while True:
await asyncio.sleep(random.randint(1, 10)) await asyncio.sleep(random.randint(1, 10))
elapsed = time() - start_time elapsed = time() - start_time
embed = discord.Embed(
title="Sherlocking username...",
description=f"Elapsed: {elapsed:.0f}s",
colour=discord.Colour.dark_theme()
)
embed.add_field(
name="stdout",
value=f"```\n{stdout.decode('utf-8', 'replace')[:1000]}```"
)
await ctx.edit( await ctx.edit(
embed=discord.Embed( embed=embed
title="Sherlocking username...",
description=f"Elapsed: {elapsed:.0f}s",
colour=discord.Colour.dark_theme()
)
) )
await ctx.defer() await ctx.defer()
@ -1598,6 +1603,10 @@ class OtherCog(commands.Cog):
) )
) )
# If it didn't error, send the results # If it didn't error, send the results
print(os.listdir(tempdir))
print(os.listdir(os.path.join(tempdir, "results")))
print(stdout.decode())
print(stderr.decode())
await ctx.respond( await ctx.respond(
file=discord.File(os.path.join(tempdir, "result.csv"), filename="result.csv"), file=discord.File(os.path.join(tempdir, "result.csv"), filename="result.csv"),
embed=discord.Embed( embed=discord.Embed(