From 886ae5741dbb75461f72ea3cdb269a06f47e574e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 14 Aug 2015 21:55:32 +0200 Subject: [PATCH] =?UTF-8?q?Dovrebbe=20sistemare=20il=20crash=20se=20non=20?= =?UTF-8?q?c'=C3=A8=20nessun=20nuovo=20messaggio.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/royalbot.py b/royalbot.py index 4879e073..6a981d69 100644 --- a/royalbot.py +++ b/royalbot.py @@ -143,7 +143,7 @@ while(True): #Ricevi gli ultimi messaggi data = getUpdates() #Se c'e' un nuovo messaggio - if(data['ok'] and data['result']): + if(data['ok'] and data['result'][0]): #Aggiorna l'update ID sul file writeFile("lastid.txt", str(data['result'][0]['update_id'] + 1)) #Leggi i dati del messaggio