From 7bf8bd5a93181783939003f230fa1bb5c84c24a2 Mon Sep 17 00:00:00 2001 From: Red-GitHubBot <88117545+Red-GitHubBot@users.noreply.github.com> Date: Tue, 14 Sep 2021 02:44:10 +0200 Subject: [PATCH] [3.4] Fix Case's modified_at attr and its format in message content (#5317) (#5319) * Fix modified_at field to properly format. * let's just fix the type hints (cherry picked from commit 89e3a78eadb0a32cf3cd89cfeec1c9f598662a57) Co-authored-by: Kowlin Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: Kowlin Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/core/modlog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redbot/core/modlog.py b/redbot/core/modlog.py index 85f57d630..69ec40fb8 100644 --- a/redbot/core/modlog.py +++ b/redbot/core/modlog.py @@ -283,7 +283,7 @@ class Case: .. note:: This attribute will be of type `int` if the Discord user can no longer be found. - modified_at: Optional[int] + modified_at: Optional[float] The UNIX time of the last change to the case. `None` if the case was never edited. message: Optional[discord.Message] @@ -310,7 +310,7 @@ class Case: until: Optional[int] = None, channel: Optional[Union[discord.abc.GuildChannel, int]] = None, amended_by: Optional[Union[discord.Object, discord.abc.User, int]] = None, - modified_at: Optional[int] = None, + modified_at: Optional[float] = None, message: Optional[discord.Message] = None, last_known_username: Optional[str] = None, ): @@ -454,7 +454,7 @@ class Case: last_modified = None if self.modified_at: - last_modified = f"" + last_modified = f"" if isinstance(self.user, int): if self.user == 0xDE1: