-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.py
53 lines (50 loc) · 1.2 KB
/
launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import logging
import sys
import os
import config
import random
import datetime
import subprocess
import time
def user_choice():
return input("> ").lower().strip()
def clear_screen():
IS_WINDOWS = os.name == "nt"
IS_MAC = sys.platform == "darwin"
INTERACTIVE_MODE = not len(sys.argv) > 1 # CLI flags = non-interactive
if IS_WINDOWS:
os.system("cls")
else:
os.system("clear")
def wait():
INTERACTIVE_MODE = not len(sys.argv) > 1 # CLI flags = non-interactive
if INTERACTIVE_MODE:
input("Push Enter to continue.")
def changelog():
print("this is W.I.P!")
wait()
main()
def main():
clear_screen()
print("----------------\n"
"Cloud-DiscordBot\n"
"----------------\n")
print("1. Start Cloud\n"
"\n"
"2. Changelog\n"
"\n"
"0. Exit\n")
choice = user_choice()
if choice == "1":
clear_screen()
print("Starting bot..\n")
time.sleep(2)
subprocess.call((sys.executable, "cloud.py"))
if choice == "2":
changelog()
if choice == "0":
clear_screen()
print("Exited with code '1'")
sys.exit(1)
start = main()
print(start)