diff --git a/funcs/miscFuncs.py b/funcs/miscFuncs.py index cdc2534..da1d3d2 100644 --- a/funcs/miscFuncs.py +++ b/funcs/miscFuncs.py @@ -225,8 +225,11 @@ def fiarReactionTest(channel,message,user): return False, 0 def monopolyReactionTest(channel,message): - with open("resources/games/oldImages/monopoly"+str(channel.id), "r") as f: - oldImage = int(f.read()) + try: + with open("resources/games/oldImages/monopoly"+str(channel.id), "r") as f: + oldImage = int(f.read()) + except: + return False if message.id == oldImage: logThis("They reacted to the monopoly game") @@ -235,9 +238,11 @@ def monopolyReactionTest(channel,message): return False def hangmanReactionTest(channel,message): - with open("resources/games/oldImages/hangman"+str(channel.id), "r") as f: - oldMessages = f.read().splitlines() - + try: + with open("resources/games/oldImages/hangman"+str(channel.id), "r") as f: + oldMessages = f.read().splitlines() + except: + return False gameMessage = False for oldMessage in oldMessages: