-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathmain.py
More file actions
48 lines (39 loc) · 1.23 KB
/
main.py
File metadata and controls
48 lines (39 loc) · 1.23 KB
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
import asyncio
import sys
import questionary
from questionary import Choice
from logo import print_startup_window
from modules.checker import check_tokens
from modules.runner import run_unified
def get_module():
result = questionary.select(
"Available options:",
choices=[
Choice("1) Always-On Mode", "always_mode"),
Choice("2) One-Time Mode", "one_time_mode"),
Choice("3) Token Checker", "token_checker"),
Choice("4) Exit", "exit"),
],
qmark="⚙️ ",
pointer="✅ "
).ask()
if result == "exit":
print("\n❤️ Subscribe to me – https://t.me/sybilwave")
sys.exit()
return result
async def main(module: str):
if module in ["always_mode", "one_time_mode"]:
await run_unified(module)
elif module == "token_checker":
await check_tokens()
elif module == "export_data":
print("Export data not implemented yet")
if __name__ == "__main__":
print_startup_window()
module = get_module()
try:
asyncio.run(main(module))
except KeyboardInterrupt:
print("\n\nProgram interrupted by user")
print("❤️ Subscribe to me – https://t.me/sybilwave")
sys.exit(0)