mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-23 11:46:18 +00:00
Document difference between View and LayoutView
This commit is contained in:
parent
eb84d0dfcb
commit
2a69ac4ca8
@ -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…
x
Reference in New Issue
Block a user