Browse Source

chore: Add notes on LayoutView behaviour when editing messages

pull/10166/head
DA-344 3 weeks ago
parent
commit
06f4052e0f
  1. 6
      discord/interactions.py
  2. 12
      discord/message.py

6
discord/interactions.py

@ -1494,6 +1494,12 @@ class InteractionMessage(Message):
The updated view to update this message with. If ``None`` is passed then
the view is removed.
.. note::
If you want to update the message to have a :class:`~discord.ui.LayoutView`, you must
explicitly set to ``None`` or empty array, as required, the ``content``, ``embed``,
``embeds``, and ``attachments`` parameters.
.. versionchanged:: 2.6
This now accepts :class:`~discord.ui.LayoutView` instances.
delete_after: Optional[:class:`float`]

12
discord/message.py

@ -1405,6 +1405,12 @@ class PartialMessage(Hashable):
The updated view to update this message with. If ``None`` is passed then
the view is removed.
.. note::
If you want to update the message to have a :class:`~discord.ui.LayoutView`, you must
explicitly set to ``None`` or empty array, as required, the ``content``, ``embed``,
``embeds``, and ``attachments`` parameters.
.. versionchanged:: 2.6
This now accepts :class:`~discord.ui.LayoutView` instances.
@ -2991,6 +2997,12 @@ class Message(PartialMessage, Hashable):
The updated view to update this message with. If ``None`` is passed then
the view is removed.
.. note::
If you want to update the message to have a :class:`~discord.ui.LayoutView`, you must
explicitly set to ``None`` or empty array, as required, the ``content``, ``embed``,
``embeds``, and ``attachments`` parameters.
Raises
-------
HTTPException

Loading…
Cancel
Save