-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlavaexe.py
29 lines (26 loc) · 842 Bytes
/
lavaexe.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
from os import system, popen
class Start():
def update():
print("[INFO] Removing existing Lavalink (If any).")
system("rm Lavalink.jar")
x = int(input("[1] - Master Build\n[2] - Dev Build\n: "))
try:
if x == 1:
system("curl -L https://github.com/freyacodes/Lavalink/releases/latest/download/Lavalink.jar -O")
elif x == 2:
system("curl -L https://ci.fredboat.com/guestAuth/repository/download/Lavalink_Build/8845:id/Lavalink.jar -O")
else:
print("invalid choice.")
exit()
print("[INFO] Update complete...")
Start.run()
except Exception as e:
print("[INFO] Latest version has no archive.")
def run():
print("[INFO] Starting Lavalink...")
try:
system("java -jar Lavalink.jar")
except Exception as e:
print("[ERROR] Error starting Lavalink.")
if __name__ == '__main__':
Start.update()