Hangman

This commit is contained in:
NikolajDanger
2020-08-08 19:13:43 +02:00
parent 1490cf81eb
commit 2daefb9585
15 changed files with 225 additions and 71 deletions

View File

@@ -234,6 +234,20 @@ def monopolyReactionTest(channel,message):
else:
return False
def hangmanReactionTest(channel,message):
with open("resources/games/oldImages/hangman"+str(channel.id), "r") as f:
oldMessages = f.read().splitlines()
gameMessage = False
for oldMessage in oldMessages:
oldMessageID = int(oldMessage)
if message.id == oldMessageID:
logThis("They reacted to the hangman game")
gameMessage = True
return gameMessage
def stopServer():
with open("resources/games/games.json","r") as f:
games = json.load(f)