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

Stavolta è la volta buona

This commit is contained in:
Steffo 2017-01-15 15:21:43 +01:00
parent 8d8d29e654
commit 35bd5f561a

7
bot.py
View file

@ -404,10 +404,11 @@ def diario():
# Aggiungi una riga al diario Royal Games
print("@" + username + ": /diario ")
if len(cmd) > 1:
if cmd[1].isprintable():
cmd[1] = cmd[1].replace("\n", " ")
entry = text.split(" ", 1)[1]
if entry.isprintable():
entry = entry.replace("\n", " ")
fdiario = filemanager.readfile("diario.txt")
fdiario += str(int(time.time())) + "|" + cmd[1] + "\n"
fdiario += str(int(time.time())) + "|" + entry + "\n"
filemanager.writefile("diario.txt", fdiario)
telegram.sendmessage("Aggiunto al diario RYG.", sentin, source)
else: