From 2ca95b01b0550e2f0e2ca708ba3bdc41d44e8602 Mon Sep 17 00:00:00 2001 From: neoarz Date: Mon, 15 Sep 2025 14:50:53 -0400 Subject: [PATCH] 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. --- cogs/general/context_menus.py | 3 +++ cogs/moderation/archive.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cogs/general/context_menus.py b/cogs/general/context_menus.py index d2b0d18..e44ffc2 100644 --- a/cogs/general/context_menus.py +++ b/cogs/general/context_menus.py @@ -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 diff --git a/cogs/moderation/archive.py b/cogs/moderation/archive.py index 62de5da..5430086 100644 --- a/cogs/moderation/archive.py +++ b/cogs/moderation/archive.py @@ -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):