From 4ce4c55d26eb246c0e7583847a3738a68163933d Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Sun, 23 Feb 2025 19:51:00 +0100 Subject: [PATCH] Mention when MessageReference.message_id can be None --- discord/message.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discord/message.py b/discord/message.py index e516fe505..05b0da183 100644 --- a/discord/message.py +++ b/discord/message.py @@ -610,6 +610,11 @@ class MessageReference: .. versionadded:: 2.5 message_id: Optional[:class:`int`] The id of the message referenced. + This can be ``None`` when this message reference was retrieved from + a system message of one of the following types: + + - :attr:`MessageType.channel_follow_add` + - :attr:`MessageType.thread_created` channel_id: :class:`int` The channel id of the message referenced. guild_id: Optional[:class:`int`]