-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
40 lines (36 loc) · 1.06 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
from commands import server
from commands import rank, messages
from core.CRUD import db
from psycopg2.errors import DuplicateTable
from os.path import exists
try:
server.CreateServerTable()
rank.CreateRankTable()
messages.CreateMessagesTable()
except DuplicateTable:
print("Tables already exists")
print("TYPE 'reset' IN ORDER TO DELETE THE OLD TABLES AND CREATE NEW ONES. BE CAREFULL, THIS WILL ERASE ALL DATA")
if(input().lower() == 'reset'):
db.custom_insert("DROP TABLE ServerConfigs")
db.custom_insert("DROP TABLE Rank")
db.custom_insert("DROP TABLE Messages")
server.CreateServerTable()
rank.CreateRankTable()
messages.CreateMessagesTable()
if not exists("localToken.txt"):
f = open("localToken.txt", "w")
f.write("Remove this and paste your bot token here")
f.close()
f = open("immoral_chars.json", "w")
f.write("""{
"𝓘" : "I",
"𝓪" : "a",
"𝓶": "m",
"𝓼" : "s",
"𝓾" : "u",
"𝓻" : "r",
"𝓿" : "v",
"𝓲" : "i",
"𝓸" : "o"
}""")
f.close()