diff --git a/bot.py b/bot.py index 94636925..6e6c4fe7 100644 --- a/bot.py +++ b/bot.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import telegram import steam @@ -8,17 +8,14 @@ while(True): msg = telegram.getUpdates() cmd = msg['text'].split(' ', 1) sby = msg['chat']['id'] + print(sby + ": " + repr(msg)) if(cmd[0].startswith('/ahnonlosoio')): - print('/ahnonlosoio') telegram.sendMessage("Ah, non lo so nemmeno io!", sby) elif(cmd[0].startswith('/ehoh')): - print('/ehoh') telegram.sendMessage("Eh, oh. Sono cose che capitano.", sby) elif(cmd[0].startswith('/start')): - print('/start') telegram.sendMessage("Ascolta, io mi starto quando mi pare. Anzi, quando Steffo ha voglia di aprirmi.", sby) elif(cmd[0].startswith('/playing')): - print('/playing ...') if(len(cmd) >= 2): n = steam.getNumberOfCurrentPlayers(cmd[1]) if(n == None): @@ -28,11 +25,9 @@ while(True): else: telegram.sendMessage(chr(9888) + " Non hai specificato un AppID!\nLa sintassi corretta è /playing .", sby) elif(cmd[0].startswith('/saldistim')): - print('/saldistim ...') if(len(cmd) >= 2): telegram.sendMessage("Ricerca di offerte di [" + cmd[1] + "](https://isthereanydeal.com/#/search:" + cmd[1].replace(' ', '%20') + ";/scroll:%23gamelist) completata.", sby) else: telegram.sendMessage(chr(9888) + " Non hai specificato un gioco! [Visualizza tutte le offerte](https://isthereanydeal.com/#/search:.;/scroll:%23gamelist).", sby) elif(cmd[0].startswith('/rage')): - print('/rage') - telegram.sendDocument("BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI", sby) \ No newline at end of file + telegram.sendDocument("BQADAgAD3wEAAh8GgAE6ZnLP5_gFMwI", sby)