aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2025-04-15 23:18:50 +0100
committerGravatar Chris Lovering <[email protected]>2025-04-15 23:18:50 +0100
commit10038d78bc09b819f173fb9cdea12667ae0e02b0 (patch)
treea8fb0f0f2c7711e27739a1abc0d23d0aa239d1f3
parentCreate a home directory for king arthur (diff)
Make RCE output good
-rw-r--r--arthur/exts/fun/remote_command_runner.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/arthur/exts/fun/remote_command_runner.py b/arthur/exts/fun/remote_command_runner.py
index 55b8025..b9e44a0 100644
--- a/arthur/exts/fun/remote_command_runner.py
+++ b/arthur/exts/fun/remote_command_runner.py
@@ -21,11 +21,15 @@ class RemoteCommands(Cog):
response = await rce_as_a_service(command)
- if not response.stderr or not response.stdout:
- await ctx.send("Successfully ran with no output!")
+ if not response.stderr and not response.stdout:
+ await ctx.send(f"Successfully ran with no output! {response.returncode = }")
return
- await ctx.send(f"```{response.stderr}```\n```{response.stdout}```")
+ await ctx.send(
+ f"{response.returncode = }\n"
+ "stderr:```{response.stderr}```\n"
+ "stdout:```{response.stdout}```"
+ )
async def setup(bot: KingArthur) -> None: