-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·34 lines (29 loc) · 890 Bytes
/
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
#!/bin/python
import os
import json
print("Creating necessary folders")
for folder in ("command-results", "command-perms", "data"):
os.mkdir(folder)
print("Creating necessary files")
for file in ("command-results/alias", "command-perms/blacklists", "command-perms/whitelists"):
with open(file, "w") as f: pass
token = input("Please enter bot token")
guildId = input("Please enter the guild id")
clientId = input("Please enter the client id")
clientSecret = input("Please enter the client secret")
prefix = input("Enter the prefix, leave blank for '['")
data = {
"general": {
"prefix": prefix or "[",
"admins": []
},
"secrets": {
"token": token,
"guild": guildId,
"client-id": clientId,
"client-secret": clientSecret,
"valid-api-keys": []
}
}
with open("CONFIG.json", "w") as f:
json.dump(data, f)