Browse Source

Document difference between View and LayoutView

auto/crowdin
Rapptz 14 hours ago
parent
commit
2a69ac4ca8
  1. 6
      discord/ui/view.py

6
discord/ui/view.py

@ -326,7 +326,8 @@ class BaseView:
@classmethod
def from_message(cls, message: Message, /, *, timeout: Optional[float] = 180.0) -> Union[View, LayoutView]:
"""Converts a message's components into a :class:`View`.
"""Converts a message's components into a :class:`View`
or :class:`LayoutView`.
The :attr:`.Message.components` of a message are read-only
and separate types from those in the ``discord.ui`` namespace.
@ -768,6 +769,9 @@ class LayoutView(BaseView):
This object must be inherited to create a UI within Discord.
This differs from a :class:`View` in that it supports all component types
and uses what Discord refers to as "v2 components".
You can find usage examples in the :resource:`repository <examples>`
.. versionadded:: 2.6

Loading…
Cancel
Save