From e0072abc3f4603885fccd83d81563c0b5a4a7038 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 4 Oct 2015 11:40:50 +0200 Subject: [PATCH] Error handling episodio 2 --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 4f0d4797..e9991338 100644 --- a/bot.py +++ b/bot.py @@ -15,7 +15,7 @@ while(True): elif(cmd[0].startswith('/start')): telegram.sendMessage("Ascolta, io mi starto quando mi pare. Anzi, quando @Steffo ha voglia di aprirmi.", sby) elif(cmd[0].startswith('/playing')): - if(cmd[1] is not None): + if(len(cmd) >= 1): n = steam.getNumberOfCurrentPlayers(cmd[1]) if(n == None): telegram.sendMessage(chr(9888) + " L'app specificata non esiste!", sby)