Converted all hangman functionality to slash commands

This commit is contained in:
NikolajDanger
2021-04-04 15:12:34 +02:00
parent 75e90d4166
commit e4a44fffef
5 changed files with 133 additions and 115 deletions

View File

@ -39,9 +39,13 @@ class ReactionCog(commands.Cog):
else:
imdbName = imdbIds[showPick-1]
await self.bot.other.bedreNetflix.addShow(channel,imdbName)
elif self.bot.databaseFuncs.hangmanReactionTest(channel,message) and ord(reaction.emoji) in range(127462,127488):
guess = chr(ord(reaction.emoji)-127397)
await self.bot.games.gameLoops.runHangman(channel,"#"+str(user.id),command="guess "+guess)
elif self.bot.databaseFuncs.hangmanReactionTest(channel, message, f"#{user.id}"):
self.bot.log("They reacted to the hangman message")
if ord(reaction.emoji) in range(127462,127488):
guess = chr(ord(reaction.emoji)-127397)
await self.bot.games.hangman.guess(message, f"#{user.id}", guess)
else:
self.bot.log("Bot they didn't react with a valid guess")
def setup(bot):
bot.add_cog(ReactionCog(bot))