From 524ca79f85b18aee4c142f5cf04a8ac7ee434037 Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:17:45 +0200 Subject: [PATCH] Actually parse the time in the detected_at methods Co-authored-by: owocado <24418520+owocado@users.noreply.github.com> --- discord/guild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/guild.py b/discord/guild.py index b3542617d6b3..5fd38ca905d2 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -4425,7 +4425,7 @@ def dm_spam_detected_at(self) -> Optional[datetime.datetime]: if not self._incidents_data: return None - return self._incidents_data.get('dm_spam_detected_at', None) + return utils.parse_time(self._incidents_data.get('dm_spam_detected_at')) @property def raid_detected_at(self) -> Optional[datetime.datetime]: @@ -4436,7 +4436,7 @@ def raid_detected_at(self) -> Optional[datetime.datetime]: if not self._incidents_data: return None - return self._incidents_data.get('raid_detected_at', None) + return utils.parse_time(self._incidents_data.get('raid_detected_at')) def invites_paused(self) -> bool: """:class:`bool`: Whether invites are paused in the guild.