From 51f8b10cf17f6f472ee83ac5621b72c24c146557 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Sat, 8 Aug 2020 19:23:31 +0200 Subject: [PATCH] :bug: --- funcs/miscFuncs.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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: