✨ Converted all hangman functionality to slash commands
This commit is contained in:
@ -100,7 +100,7 @@ class databaseFuncs():
|
||||
else:
|
||||
return False, 0
|
||||
|
||||
def hangmanReactionTest(self, channel,message):
|
||||
def hangmanReactionTest(self, channel, message, user):
|
||||
try:
|
||||
with open("resources/games/oldImages/hangman"+str(channel.id), "r") as f:
|
||||
oldMessages = f.read().splitlines()
|
||||
@ -111,8 +111,11 @@ class databaseFuncs():
|
||||
for oldMessage in oldMessages:
|
||||
oldMessageID = int(oldMessage)
|
||||
if message.id == oldMessageID:
|
||||
self.bot.log("They reacted to the hangman game")
|
||||
gameMessage = True
|
||||
game = self.bot.database["hangman games"].find_one({"_id":str(channel.id)})
|
||||
if user == game["player"]:
|
||||
gameMessage = True
|
||||
|
||||
break
|
||||
|
||||
return gameMessage
|
||||
|
||||
|
Reference in New Issue
Block a user