Simplify log format

This commit is contained in:
2021-11-29 14:38:37 +01:00
parent 5c5ecd7f48
commit ece53bb2a7

4
log.py
View File

@@ -19,11 +19,11 @@ async def log(event):
await event.respond(rpl)
await client(functions.contacts.BlockRequest(chat))
f = open(str(event.chat_id), "a")
f.write(str(event.id) + ": " + str(event.chat_id) + " => " + str(myid) + "\n")
f.write("")
else:
#Outgoing message
f = open(str(event.chat_id), "a")
f.write(str(event.id) + ": " + str(event.sender_id) + " => " + str(event.chat_id) + "\n")
f.write("")
f.write(event.raw_text + "\n")
f.close()