From f194bc498c0117dc3d3c540ff5af1c1eb212167f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 26 May 2016 10:10:07 +0000 Subject: [PATCH] ep5 i bug colpiscono ancora --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index cd05355..4e7e621 100644 --- a/main.py +++ b/main.py @@ -349,7 +349,7 @@ def findgamebyname(name) -> Game: """Trova una partita con un certo nome.""" for game in inprogress: if game.name.lower() == name.lower(): - return name + return game # Comandi a cui risponde il bot def ping(bot, update): @@ -489,7 +489,7 @@ def power(bot, update): if game is None: game = findgamebyid(int(cmd[1])) if game is not None: - player = game.findplayerbyid(update.message.from_user['id']) + player = game.findplayerbyid(int(update.message.from_user['id']) if player is not None: if player.alive: player.role.power(bot, game, player, cmd[2])