diff --git a/Gwendolyn.py b/Gwendolyn.py index 3e058c9..1b3acfb 100644 --- a/Gwendolyn.py +++ b/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","")