mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Document message types that can have a default message reference
This commit is contained in:
@ -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`]
|
||||
@ -2010,9 +2015,16 @@ class Message(PartialMessage, Hashable):
|
||||
The :class:`TextChannel` or :class:`Thread` that the message was sent from.
|
||||
Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message.
|
||||
reference: Optional[:class:`~discord.MessageReference`]
|
||||
The message that this message references. This is only applicable to messages of
|
||||
type :attr:`MessageType.pins_add`, crossposted messages created by a
|
||||
followed channel integration, or message replies.
|
||||
The message that this message references. This is only applicable to
|
||||
message replies (:attr:`MessageType.reply`), crossposted messages created by
|
||||
a followed channel integration, forwarded messages, and messages of type:
|
||||
|
||||
- :attr:`MessageType.pins_add`
|
||||
- :attr:`MessageType.channel_follow_add`
|
||||
- :attr:`MessageType.thread_created`
|
||||
- :attr:`MessageType.thread_starter_message`
|
||||
- :attr:`MessageType.poll_result`
|
||||
- :attr:`MessageType.context_menu_command`
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
|
Reference in New Issue
Block a user