diff --git a/funcs/games/fourInARowDraw.py b/funcs/games/fourInARowDraw.py index 1eb50b9..444030f 100644 --- a/funcs/games/fourInARowDraw.py +++ b/funcs/games/fourInARowDraw.py @@ -132,14 +132,14 @@ def drawImage(channel): startx -= placeGridSize[0]*3 + 90 starty -= gridBorder + 60 - + mask = winBar.copy()#.convert("L") #mask.putalpha(128) #mask.save("test.png") winBarImage = Image.new("RGBA",mask.size,color=winBarColor) background.paste(winBarImage,(startx,starty),mask) - + # Bottom textPadding = 20 diff --git a/funcs/miscFuncs.py b/funcs/miscFuncs.py index ce4233a..ea693e2 100644 --- a/funcs/miscFuncs.py +++ b/funcs/miscFuncs.py @@ -168,10 +168,10 @@ def makeFiles(): for path, content in data["json"].items(): makeJsonFile(path,content) - + for path, content in data["txt"].items(): makeTxtFile(path,content) - + for path in data["folder"]: makeFolder(path) @@ -183,7 +183,7 @@ def replaceMultiple(mainString, toBeReplaces, newString): if elem in mainString : # Replace the string mainString = mainString.replace(elem, newString) - + return mainString def emojiToCommand(emoji): @@ -236,27 +236,27 @@ def monopolyReactionTest(channel,message): def stopServer(): with open("resources/games/games.json","r") as f: games = json.load(f) - + games["trivia questions"] = {} games["blackjack games"] = {} games["4 in a row games"] = {} - + with open("resources/games/games.json","w") as f: json.dump(games,f,indent=4) - + emptyDict = {} with open("resources/games/monopolyGames.json", "w") as f: json.dump(emptyDict,f,indent=4) - + with open("resources/games/hexGames.json", "w") as f: json.dump(emptyDict,f,indent=4) - + def deleteGame(gameType,channel): with open("resources/games/games.json", "r") as f: data = json.load(f) - + del data[gameType][channel] with open("resources/games/games.json", "w") as f: json.dump(data,f,indent=4) @@ -264,7 +264,7 @@ def deleteGame(gameType,channel): def addToDict(userID,userName): with open("resources/users.json", "r") as f: data = json.load(f) - + if userID in data: if data[userID]["user name"] != userName: logThis("changing name for "+userName) @@ -306,14 +306,14 @@ def getID(userName): try: with open("resources/users.json", "r") as f: data = json.load(f) - + userID = None for key, value in data.items(): if userName.lower() == value["user name"].lower(): userID = key break - + return userID except: - logThis("Error getting ID") \ No newline at end of file + logThis("Error getting ID")