From 2a69ac4ca8a5dc5ac307335f32d7c4c6aeff355e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 18 Aug 2025 04:34:24 -0400 Subject: [PATCH] Document difference between View and LayoutView --- discord/ui/view.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discord/ui/view.py b/discord/ui/view.py index 7b4fdd1c4..d2ff034d6 100644 --- a/discord/ui/view.py +++ b/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 ` .. versionadded:: 2.6