log timestamp in dm_images

pull/132/head
Aevann 2023-02-22 19:21:16 +02:00
parent 9de379d72f
commit b0fdd78d8b
2 changed files with 4 additions and 2 deletions

View File

@ -268,7 +268,7 @@ def process_dm_images(v, user):
if body:
with open(f"{LOG_DIRECTORY}/dm_images.log", "a+", encoding="utf-8") as f:
if user:
f.write(f'{body.strip()}, {v.username}, {v.id}, {user.username}, {user.id}\n')
f.write(f'{body.strip()}, {v.username}, {v.id}, {user.username}, {user.id}, {int(time.time())}\n')
else:
f.write(f'{body.strip()}, {v.username}, {v.id}, Modmail, Modmail\n')
f.write(f'{body.strip()}, {v.username}, {v.id}, Modmail, Modmail, {int(time.time())}\n')
return body

View File

@ -9,6 +9,7 @@
<th>Image</th>
<th>Sender</th>
<th>Sent To</th>
<th>At</th>
</tr>
</thead>
@ -39,6 +40,7 @@
{% endif %}
{% endif %}
</td>
<td {% if item[5] %}data-time="{{item[5]}}"{% endif %}></td>
</tr>
{% endfor %}
</table>