✨
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user