mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 15:06:07 +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
|
||||
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
|
||||
|
||||
|
16
docs/api.rst
16
docs/api.rst
@ -3851,17 +3851,25 @@ of :class:`enum.Enum`.
|
||||
|
||||
.. 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
|
||||
|
||||
A forwarded message.
|
||||
|
||||
.. attribute:: default
|
||||
.. attribute:: reply
|
||||
|
||||
An alias for :attr:`.reply`.
|
||||
An alias for :attr:`.default`.
|
||||
|
||||
.. _discord-api-audit-logs:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user