Even more converting to slash commands

This commit is contained in:
NikolajDanger
2021-03-29 17:01:01 +02:00
parent 232f97d0c8
commit e8c7fb95e5
22 changed files with 487 additions and 191 deletions

View File

@ -32,19 +32,21 @@ class Funcs():
def stopServer(self):
self.bot.database["trivia questions"].delete_many({})
self.bot.database["blackjack games"].delete_many({})
self.bot.database["connect 4 games"].delete_many({})
self.bot.database["hangman games"].delete_many({})
if not self.bot.options.testing:
g = git.cmd.Git("")
g.pull()
def fiarReactionTest(self,channel,message,user):
game = self.bot.database["4 in a row games"].find_one({"_id":str(channel.id)})
def connectFourReactionTest(self,channel,message,user):
game = self.bot.database["connect 4 games"].find_one({"_id":str(channel.id)})
with open("resources/games/oldImages/fourInARow"+str(channel.id), "r") as f:
with open("resources/games/oldImages/connectFour"+str(channel.id), "r") as f:
oldImage = int(f.read())
if message.id == oldImage:
logThis("They reacted to the fourinarow game")
logThis("They reacted to the connectFour game")
turn = game["turn"]
if user == game["players"][turn]:
return True, turn+1