From 67bcd72d9c44ed9a029261bae3f7a262439c4596 Mon Sep 17 00:00:00 2001 From: Kowlin Date: Sat, 16 Oct 2021 21:38:52 +0200 Subject: [PATCH] Update the timestamping we forgot to Discord compatible timestamping (#5395) --- redbot/cogs/modlog/modlog.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/redbot/cogs/modlog/modlog.py b/redbot/cogs/modlog/modlog.py index c7d7e5e90..a5545e3c8 100644 --- a/redbot/cogs/modlog/modlog.py +++ b/redbot/cogs/modlog/modlog.py @@ -134,9 +134,7 @@ class ModLog(commands.Cog): else: message = _("{case}\n**Timestamp:** {timestamp}").format( case=await case.message_content(embed=False), - timestamp=datetime.utcfromtimestamp(case.created_at).strftime( - "%Y-%m-%d %H:%M:%S UTC" - ), + timestamp=f"", ) await ctx.send(message) @@ -167,14 +165,12 @@ class ModLog(commands.Cog): embed_requested = await ctx.embed_requested() if embed_requested: rendered_cases = [await case.message_content(embed=True) for case in cases] - elif not embed_requested: + else: rendered_cases = [] for case in cases: message = _("{case}\n**Timestamp:** {timestamp}").format( case=await case.message_content(embed=False), - timestamp=datetime.utcfromtimestamp(case.created_at).strftime( - "%Y-%m-%d %H:%M:%S UTC" - ), + timestamp=f"", ) rendered_cases.append(message) @@ -208,9 +204,7 @@ class ModLog(commands.Cog): for case in cases: message += _("{case}\n**Timestamp:** {timestamp}\n\n").format( case=await case.message_content(embed=False), - timestamp=datetime.utcfromtimestamp(case.created_at).strftime( - "%Y-%m-%d %H:%M:%S UTC" - ), + timestamp=f"", ) for page in pagify(message, ["\n\n", "\n"], priority=True): rendered_cases.append(page)