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

Magari così si possono mettere emoji nel /diario ?

This commit is contained in:
Steffo 2016-09-21 16:43:28 +02:00
parent 46b1ba1511
commit 26886fd146

2
bot.py
View file

@ -396,7 +396,7 @@ def diario():
cmd = text.split(" ", 1) cmd = text.split(" ", 1)
if len(cmd) > 1: if len(cmd) > 1:
if cmd[1].isprintable(): if cmd[1].isprintable():
cmd[1] = cmd[1].replace("\n", " ") cmd[1] = cmd[1].replace("\n", " ").encode("unicode_escape")
fdiario = filemanager.readfile("diario.txt") fdiario = filemanager.readfile("diario.txt")
fdiario += str(int(time.time())) + "|" + cmd[1] + "\n" fdiario += str(int(time.time())) + "|" + cmd[1] + "\n"
filemanager.writefile("diario.txt", fdiario) filemanager.writefile("diario.txt", fdiario)