From 4cb3b410a7f61d080e84823274a5a489abd3cf68 Mon Sep 17 00:00:00 2001 From: DA-344 <108473820+DA-344@users.noreply.github.com> Date: Tue, 22 Apr 2025 23:08:29 +0200 Subject: [PATCH] chore: more docs things ig --- discord/ui/file.py | 3 +-- discord/ui/media_gallery.py | 4 +++- discord/ui/section.py | 2 ++ discord/ui/separator.py | 2 ++ discord/ui/text_display.py | 2 ++ 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/discord/ui/file.py b/discord/ui/file.py index 2e10ff989..341860cc7 100644 --- a/discord/ui/file.py +++ b/discord/ui/file.py @@ -56,8 +56,7 @@ class File(Item[V]): class MyView(ui.LayoutView): file = ui.File('attachment://file.txt') - # attachment://file.txt points to an attachment uploaded alongside - # this view + # attachment://file.txt points to an attachment uploaded alongside this view Parameters ---------- diff --git a/discord/ui/media_gallery.py b/discord/ui/media_gallery.py index 3deca63c8..e3db92215 100644 --- a/discord/ui/media_gallery.py +++ b/discord/ui/media_gallery.py @@ -45,7 +45,9 @@ __all__ = ('MediaGallery',) class MediaGallery(Item[V]): """Represents a UI media gallery. - This can contain up to 10 :class:`.MediaGalleryItem` s. + Can contain up to 10 :class:`.MediaGalleryItem` 's. + + This is a top-level layout component that can only be used on :class:`LayoutView`. .. versionadded:: 2.6 diff --git a/discord/ui/section.py b/discord/ui/section.py index 53d433c3e..11de2ec18 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -44,6 +44,8 @@ __all__ = ('Section',) class Section(Item[V]): """Represents a UI section. + This is a top-level layout component that can only be used on :class:`LayoutView` + .. versionadded:: 2.6 Parameters diff --git a/discord/ui/separator.py b/discord/ui/separator.py index e212f4b4e..48908df9d 100644 --- a/discord/ui/separator.py +++ b/discord/ui/separator.py @@ -42,6 +42,8 @@ __all__ = ('Separator',) class Separator(Item[V]): """Represents a UI separator. + This is a top-level layout component that can only be used on :class:`LayoutView`. + .. versionadded:: 2.6 Parameters diff --git a/discord/ui/text_display.py b/discord/ui/text_display.py index f311cf66c..beff74c6e 100644 --- a/discord/ui/text_display.py +++ b/discord/ui/text_display.py @@ -42,6 +42,8 @@ __all__ = ('TextDisplay',) class TextDisplay(Item[V]): """Represents a UI text display. + This is a top-level layout component that can only be used on :class:`LayoutView`. + .. versionadded:: 2.6 Parameters