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:
parent
8d8d29e654
commit
35bd5f561a
1 changed files with 4 additions and 3 deletions
7
bot.py
7
bot.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue