-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (64 loc) · 3.69 KB
/
setup.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# ik its a mess this was kinda rushed lmao
import time
import os
print('\n' * 100)
print("""
██████╗░░█████╗░████████╗░█████╗░████████╗░█████╗░ ░██████╗███████╗████████╗██╗░░░██╗██████╗░
██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗╚══██╔══╝██╔══██╗ ██╔════╝██╔════╝╚══██╔══╝██║░░░██║██╔══██╗
██████╔╝██║░░██║░░░██║░░░███████║░░░██║░░░██║░░██║ ╚█████╗░█████╗░░░░░██║░░░██║░░░██║██████╔╝
██╔═══╝░██║░░██║░░░██║░░░██╔══██║░░░██║░░░██║░░██║ ░╚═══██╗██╔══╝░░░░░██║░░░██║░░░██║██╔═══╝░
██║░░░░░╚█████╔╝░░░██║░░░██║░░██║░░░██║░░░╚█████╔╝ ██████╔╝███████╗░░░██║░░░╚██████╔╝██║░░░░░
╚═╝░░░░░░╚════╝░░░░╚═╝░░░╚═╝░░╚═╝░░░╚═╝░░░░╚════╝░ ╚═════╝░╚══════╝░░░╚═╝░░░░╚═════╝░╚═╝░░░░░
© 2023 by h3lped
""")
print("[*] Note: You ONLY run this file once. \n")
TOKEN = input("[!] Your Discord Token: ")
prefix = input("[!] What would you like your prefix to be: ")
lavalink = input("[?] Would you like to use your own lavalink server? (y/n): ")
if lavalink.lower() == "y" or lavalink.lower() == "yes":
lavalink_host = input("Lavalink Host: ")
lavalink_port = input("Lavalink Port: ")
lavalink_password = input("Lavalink Password: ")
elif lavalink.lower() == "n" or lavalink.lower() == "no":
lavalink_host = "minatoaqua.miraclecherrypie.cf" # Default Lavalink Server
lavalink_port = 8080
lavalink_password = "KawaiiOnyanisbetter!!!!"
print("[*] Added default lavalink server!")
else:
print("[!] Please enter a valid option!")
exit()
osu = input("[!] Input your osu! API key: ")
if TOKEN is None:
print("Please Insert A Discord Token")
exit()
elif prefix is None:
print("Please Insert A Prefix")
exit()
try:
config = f"""# Main Bot Config
TOKEN={TOKEN}
PREFIX={prefix}
# Lavalink Config
LAVALINK_HOST={lavalink_host}
LAVALINK_PORT={lavalink_port}
LAVALINK_PASSWORD={lavalink_password}
# Osu! Config
OSU_API_KEY={osu}"""
print("[*] Preparing to uninstall discord.py")
os.system('pip uninstall discord.py')
time.sleep(3)
print("[*] Preparing to install requirements.txt")
os.system('pip install -r requirements.txt')
print("\n" * 100)
print("[*] Dependancies Installed!")
print("[*] Creating .env file...")
time.sleep(3)
open('./.env', 'w').write(config)
print("[*] Created .env file!")
time.sleep(3)
print("[!] Running the bot...")
print("[*] Note: From now on only run main.py \n[*] All Settings can be changed in the .env file!")
os.system('py main.py')
except Exception as e:
print("\n[!] An error occured while creating the config file!\n" + str(e))
exit()