From 1b1c88fd65b129d15405bcd3fa08e67d9d822422 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 20 Jan 2017 13:16:29 +0100 Subject: [PATCH] =?UTF-8?q?magari=20stavolta=20=C3=A8=20quella=20buona?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot.py b/bot.py index dfa5e34a..b26d4875 100644 --- a/bot.py +++ b/bot.py @@ -472,6 +472,7 @@ def lolfree(): def getrygimage(): # Ricevi il link alla tua immagine del profilo Royal Games. print("@" + username + ": /getrygimage") + cmd = text.split(" ", 1) if len(cmd) > 1: if len(cmd[1]) > 2: telegram.sendmessage("Puoi mettere solo due lettere.") @@ -479,7 +480,9 @@ def getrygimage(): # FIXME: percorsi assoluti directory = "/var/www/html/rygimages/{}.png" infile = open("/royal/bot/basiclogo.svg", "r") + print(infile.read()) indata = infile.read().format(cmd[1]).encode() + print(indata.decode()) infile.close() try: outfile = open(directory.format(cmd[1]), "x")