mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Document message types that can have a default message reference
This commit is contained in:
parent
0e4f06103e
commit
19f02c40b3
@ -610,6 +610,11 @@ class MessageReference:
|
|||||||
.. versionadded:: 2.5
|
.. versionadded:: 2.5
|
||||||
message_id: Optional[:class:`int`]
|
message_id: Optional[:class:`int`]
|
||||||
The id of the message referenced.
|
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`
|
channel_id: :class:`int`
|
||||||
The channel id of the message referenced.
|
The channel id of the message referenced.
|
||||||
guild_id: Optional[:class:`int`]
|
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.
|
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.
|
Could be a :class:`DMChannel` or :class:`GroupChannel` if it's a private message.
|
||||||
reference: Optional[:class:`~discord.MessageReference`]
|
reference: Optional[:class:`~discord.MessageReference`]
|
||||||
The message that this message references. This is only applicable to messages of
|
The message that this message references. This is only applicable to
|
||||||
type :attr:`MessageType.pins_add`, crossposted messages created by a
|
message replies (:attr:`MessageType.reply`), crossposted messages created by
|
||||||
followed channel integration, or message replies.
|
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
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
|
16
docs/api.rst
16
docs/api.rst
@ -3851,17 +3851,25 @@ of :class:`enum.Enum`.
|
|||||||
|
|
||||||
.. versionadded:: 2.5
|
.. versionadded:: 2.5
|
||||||
|
|
||||||
.. attribute:: reply
|
.. attribute:: default
|
||||||
|
|
||||||
A message reply.
|
A standard reference used by message replies (:attr:`MessageType.reply`),
|
||||||
|
crossposted messaged created by a followed channel integration, 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`
|
||||||
|
|
||||||
.. attribute:: forward
|
.. attribute:: forward
|
||||||
|
|
||||||
A forwarded message.
|
A forwarded message.
|
||||||
|
|
||||||
.. attribute:: default
|
.. attribute:: reply
|
||||||
|
|
||||||
An alias for :attr:`.reply`.
|
An alias for :attr:`.default`.
|
||||||
|
|
||||||
.. _discord-api-audit-logs:
|
.. _discord-api-audit-logs:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user