1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

magari stavolta è quella buona

This commit is contained in:
Steffo 2017-01-20 13:16:29 +01:00
parent 69e888d36d
commit 1b1c88fd65

3
bot.py
View file

@ -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")