1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
This commit is contained in:
Steffo 2016-02-01 17:32:42 +01:00
parent 2f0951bd7c
commit 4e265ce655

3
bot.py
View file

@ -640,11 +640,14 @@ while True:
tosend += u['name'] + "\n" tosend += u['name'] + "\n"
telegram.sendmessage(tosend, sentin, source) telegram.sendmessage(tosend, sentin, source)
elif text.startswith('/diario'): elif text.startswith('/diario'):
print("@" + username + ": /diario ")
cmd = text.split(" ", 1) cmd = text.split(" ", 1)
d = filemanager.readfile("diario.txt") d = filemanager.readfile("diario.txt")
d += str(time.time()) + " | " + cmd[1] + "\n" d += str(time.time()) + " | " + cmd[1] + "\n"
filemanager.writefile("diario.txt", d) filemanager.writefile("diario.txt", d)
telegram.sendmessage("Aggiunto al diario RYG.", sentin, source) telegram.sendmessage("Aggiunto al diario RYG.", sentin, source)
else:
print("@" + username + " bloccato.")