Maintinance 🔧

This commit is contained in:
NikolajDanger
2020-12-03 15:58:13 +01:00
parent d03ae74937
commit 1fb2df546e
6 changed files with 82 additions and 78 deletions

View File

@ -77,14 +77,14 @@ class Werewolf():
channel = "#"+str(ctx.channel.id)
if round == 0:
await asyncio.sleep(120)
game = self.bot.database["werewolf games"].find_one({"_id":channel})
AINumber = 1
while len(game["users"].keys()) >= minimumPlayers and len(game["users"].keys()) < minimumPlayersWithAI:
user = {"role": None}
self.bot.database["werewolf games"].update_one({"_id":"#"+str(ctx.channel.id)},
{"$set":{"users."+str(AINumber):user}})
{"$set":{"users."+self.bot.generator.nameGen():user}})
game = self.bot.database["werewolf games"].find_one({"_id":channel})
AINumber += 1
self.bot.database["werewolf games"].update_one({"_id":channel},{"$inc":{"round":1}})
await self.werewolfLoop(ctx,round+1)
else: