forked from ashui501/Uchiha-Itachi-bot-music
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (33 loc) · 771 Bytes
/
main.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
import asyncio
import os
import subprocess
import sys
vars = ["API_ID", "API_HASH", "SESSION", "REDIS_URI", "REDIS_PASSWORD"]
def _check(z):
new = []
for var in vars:
ent = os.environ.get(var + z)
if not ent:
return False, new
new.append(ent)
return True, new
for z in range(5):
n = str(z + 1)
if z == 0:
z = ""
fine, out = _check(str(z))
if fine:
subprocess.Popen(
[sys.executable, "-m", "CythonX", out[0], out[1], out[2], out[3], out[4], n],
stdin=None,
stderr=None,
stdout=None,
cwd=None,
)
loop = asyncio.get_event_loop()
try:
loop.run_forever()
except Exception as er:
print(er)
finally:
loop.close()