forked from TeamKillerX/RyuzakiLib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkillerxmeta.py
53 lines (46 loc) · 952 Bytes
/
killerxmeta.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 asyncio
import os
import subprocess
import sys
vars = [
"API_ID",
"API_HASH",
"STRING_SESSION1",
"BOT_TOKEN",
"LOG_GROUP_ID",
"SUDO_USERS",
"MONGO_DB_URI",
"OWNER_ID",
"DURATION_LIMIT",
"SUPPORT_CHANNEL",
"ASSISTANT_PREFIX",
"MUSIC_BOT_NAME",
]
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", "KillerXMusic", 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()