mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
style: Update date format in archive and add context menu note
Changed date formatting in archive.py from DD.MM.YYYY to MM/DD/YYYY for consistency. Added a note in context_menus.py indicating the file is unused and may be removed in the future.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# This is not used anymore, but I'm keeping it here for reference
|
||||
# TODO: Remove this once we have a better way to handle context menus
|
||||
|
||||
# import discord
|
||||
# from discord import app_commands
|
||||
# from discord.ext import commands
|
||||
|
||||
@@ -40,12 +40,12 @@ class Archive(commands.Cog, name="archive"):
|
||||
else ""
|
||||
)
|
||||
|
||||
message_line = f"{message.created_at.strftime('%d.%m.%Y %H:%M:%S')} {message.author} {message.id}: {message.clean_content} {attachments_text}\n"
|
||||
message_line = f"{message.created_at.strftime('%m/%d/%Y %H:%M:%S')} {message.author} {message.id}: {message.clean_content} {attachments_text}\n"
|
||||
messages.append(message_line)
|
||||
|
||||
with open(log_file, "w", encoding="UTF-8") as f:
|
||||
f.write(
|
||||
f'Archived messages from: #{context.channel} ({context.channel.id}) in the guild "{context.guild}" ({context.guild.id}) at {datetime.now().strftime("%d.%m.%Y %H:%M:%S")}\n'
|
||||
f'Archived messages from: #{context.channel} ({context.channel.id}) in the guild "{context.guild}" ({context.guild.id}) at {datetime.now().strftime("%m/%d/%Y %H:%M:%S")}\n'
|
||||
)
|
||||
|
||||
for message_line in reversed(messages):
|
||||
|
||||
Reference in New Issue
Block a user