From 65344378f6326b0e238b721c38a65fba1d219848 Mon Sep 17 00:00:00 2001 From: Red-GitHubBot <88117545+Red-GitHubBot@users.noreply.github.com> Date: Sat, 16 Oct 2021 21:40:14 +0200 Subject: [PATCH] [3.4] Update the timestamping we forgot to Discord compatible timestamping (#5395) (#5401) (cherry picked from commit 67bcd72d9c44ed9a029261bae3f7a262439c4596) Co-authored-by: Kowlin Co-authored-by: Kowlin --- 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)