This commit is contained in:
jona605a
2020-09-25 19:00:58 +02:00
parent 3fb2da1c0e
commit dcd37206bc
4 changed files with 7 additions and 7 deletions

View File

@ -9,12 +9,12 @@ class LoveLetter():
self.draw = DrawLove(bot)
# Parses command
def parseLove(self, command, channel, user):
def parseLove(self, command, channel, user, userchannel):
commands = command.lower().split()
game = self.bot.database["loveletter games"].find_one({"_id":channel})
if command == "" or command == " ":
logThis(str(user)+" started a Love Letter game with loveStart(). ")
logThis(str(user)+" created a Love Letter game with loveStart(). ")
return self.loveStart(channel)
# If using a command with no game, return error
@ -30,6 +30,7 @@ class LoveLetter():
username = self.bot.funcs.getName(user)
game["player hands"][username] = card
game["discard piles"][username] = []
game["user channel"][username] = userchannel # Used for direct (private) messages to the users
self.bot.database["loveletter games"].replace_one({"_id":channel},game)
return username+" joined the game! Type \"!loveletter begin\" once all players have joined.", False, False
else: