Repository: Rapptz/discord.py
File: discord/guild.py (Python)

Code before:
        if not self._incidents_data:
            return None

        return utils.parse_time(self._incidents_data.get('dms_disabled_until'))

    @property
    def dm_spam_detected_at(self) -> Optional[datetime.datetime]:
        """:class:`datetime.datetime`: Returns the time when DM spam was detected in the guild.

        .. versionadded:: 2.4
        """
        if not self._incidents_data:
            return None

        return self._incidents_data.get('dm_spam_detected_at', None)

    @property
    def raid_detected_at(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: Returns the time when a raid was detected in the guild.

        .. versionadded:: 2.4
        """
        if not self._incidents_data:
            return None

        return self._incidents_data.get('raid_detected_at', None)

    def invites_paused(self) -> bool:
        """:class:`bool`: Whether invites are paused in the guild.

        .. versionadded:: 2.4
        """
        if not self.invites_paused_until:
            return False

        return self.invites_paused_until > utils.utcnow()

    def dms_paused(self) -> bool:
        """:class:`bool`: Whether DMs are paused in the guild.

        .. versionadded:: 2.4
        """
        if not self.dms_paused_until:
            return False

        return self.dms_paused_until > utils.utcnow()

    def dm_spam_detected(self) -> bool:
        """:class:`bool`: Whether DM spam was detected in the guild.

        .. versionadded:: 2.4

Review comment (suggestion):
```suggestion
        return utils.parse_time(self._incidents_data.get('raid_detected_at'))
```

Code after:
    @property
    def invites_paused_until(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: If invites are paused, returns when
        invites will get enabled in UTC, otherwise returns None.

        .. versionadded:: 2.4
        """
        if not self._incidents_data:
            return None

        return utils.parse_time(self._incidents_data.get('invites_disabled_until'))

    @property
    def dms_paused_until(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: If DMs are paused, returns when DMs
        will get enabled in UTC, otherwise returns None.

        .. versionadded:: 2.4
        """
        if not self._incidents_data:
            return None

        return utils.parse_time(self._incidents_data.get('dms_disabled_until'))

    @property
    def dm_spam_detected_at(self) -> Optional[datetime.datetime]:
        """:class:`datetime.datetime`: Returns the time when DM spam was detected in the guild.

        .. versionadded:: 2.5
        """
        if not self._incidents_data:
            return None

        return utils.parse_time(self._incidents_data.get('dm_spam_detected_at'))

    @property
    def raid_detected_at(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: Returns the time when a raid was detected in the guild.

        .. versionadded:: 2.5
        """
        if not self._incidents_data:
            return 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.

        .. versionadded:: 2.4
        """