mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +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
|
# Aggiungi una riga al diario Royal Games
|
||||||
print("@" + username + ": /diario ")
|
print("@" + username + ": /diario ")
|
||||||
if len(cmd) > 1:
|
if len(cmd) > 1:
|
||||||
if cmd[1].isprintable():
|
entry = text.split(" ", 1)[1]
|
||||||
cmd[1] = cmd[1].replace("\n", " ")
|
if entry.isprintable():
|
||||||
|
entry = entry.replace("\n", " ")
|
||||||
fdiario = filemanager.readfile("diario.txt")
|
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)
|
filemanager.writefile("diario.txt", fdiario)
|
||||||
telegram.sendmessage("Aggiunto al diario RYG.", sentin, source)
|
telegram.sendmessage("Aggiunto al diario RYG.", sentin, source)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue