Creates swcharacters if it doesn't exist
This commit is contained in:
12
Gwendolyn.py
12
Gwendolyn.py
@ -5,9 +5,21 @@ import asyncio
|
||||
import pickle
|
||||
import codecs
|
||||
import string
|
||||
import json
|
||||
|
||||
import funcs
|
||||
|
||||
# Creates swcharacters.json if it doesn't exist
|
||||
try:
|
||||
f = open("resources/swcharacters.json","r")
|
||||
except:
|
||||
funcs.logThis("swcharacters.json didn't exist. Making it now.")
|
||||
emptyDict = {}
|
||||
with open("resources/swcharacters.json","w") as f:
|
||||
json.dump(emptyDict,f,indent = 4)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
# Gets secret bot token
|
||||
with open("token.txt","r") as f:
|
||||
token = f.read().replace("\n","")
|
||||
|
Reference in New Issue
Block a user