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

Code before:
    def created_at(self) -> datetime.datetime:
        """:class:`datetime.datetime`: The message's creation time in UTC."""
        return utils.snowflake_time(self.id)

    @property
    def edited_at(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: An aware UTC datetime object containing the edited time of the message."""
        return self._edited_timestamp

    @property
    def thread(self) -> Optional[Thread]:
        """Optional[:class:`Thread`]: The public thread created from this message, if it exists.

        .. note::

            For messages received via the gateway this does not retrieve archived threads, as they
            are not retained in the internal cache. Use :meth:`fetch_thread` instead.

        .. versionadded:: 2.4
        """
        if self.guild is not None:
            # Fall back to guild threads in case one was created after the message
            return self._thread or self.guild.get_thread(self.id)

    @property
    @deprecated("interaction_metadata")
    def interaction(self) -> Optional[MessageInteraction]:
        """Optional[:class:`~discord.MessageInteraction`]: The interaction that this message is a response to.

        .. versionadded:: 2.0
        .. deprecated:: 2.4
            This attribute is deprecated and will be removed in a future version. Use :attr:`.interaction_metadata` instead.
        """
        return self._interaction

    def is_system(self) -> bool:
        """:class:`bool`: Whether the message is a system message.

        A system message is a message that is constructed entirely by the Discord API
        in response to something.

        .. versionadded:: 1.3
        """
        return self.type not in (
            MessageType.default,
            MessageType.reply,
            MessageType.chat_input_command,
            MessageType.context_menu_command,
            MessageType.thread_starter_message,
        )


Review comment (suggestion):
```suggestion
    @deprecated("This attribute is deprecated, please use Message.interaction_metadata instead.")
```

Code after:
    def created_at(self) -> datetime.datetime:
        """:class:`datetime.datetime`: The message's creation time in UTC."""
        return utils.snowflake_time(self.id)

    @property
    def edited_at(self) -> Optional[datetime.datetime]:
        """Optional[:class:`datetime.datetime`]: An aware UTC datetime object containing the edited time of the message."""
        return self._edited_timestamp

    @property
    def thread(self) -> Optional[Thread]:
        """Optional[:class:`Thread`]: The public thread created from this message, if it exists.

        .. note::

            For messages received via the gateway this does not retrieve archived threads, as they
            are not retained in the internal cache. Use :meth:`fetch_thread` instead.

        .. versionadded:: 2.4
        """
        if self.guild is not None:
            # Fall back to guild threads in case one was created after the message
            return self._thread or self.guild.get_thread(self.id)

    @property
    @deprecated("This attribute is deprecated, please use Message.interaction_metadata instead.")
    def interaction(self) -> Optional[MessageInteraction]:
        """Optional[:class:`~discord.MessageInteraction`]: The interaction that this message is a response to.

        .. versionadded:: 2.0
        .. deprecated:: 2.4
            This attribute is deprecated and will be removed in a future version. Use :attr:`.interaction_metadata` instead.
        """
        return self._interaction

    def is_system(self) -> bool:
        """:class:`bool`: Whether the message is a system message.

        A system message is a message that is constructed entirely by the Discord API
        in response to something.

        .. versionadded:: 1.3
        """
        return self.type not in (
            MessageType.default,
            MessageType.reply,
            MessageType.chat_input_command,
            MessageType.context_menu_command,
            MessageType.thread_starter_message,
        )