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

Non bloccarmi il diario se c'è un \n nella risposta.

This commit is contained in:
Steffo 2016-02-05 18:55:28 +01:00
parent 1c9ec0b3bc
commit f825dff121

1
bot.py
View file

@ -562,6 +562,7 @@ while True:
elif text.startswith('/diario'):
print("@" + username + ": /diario ")
cmd = text.split(" ", 1)
cmd[1] = cmd[1].replace("\n", " ")
d = filemanager.readfile("diario.txt")
d += str(int(time.time())) + "|" + cmd[1] + "\n"
filemanager.writefile("diario.txt", d)