Browse Source

chore: update docstrings

pull/10166/head
DA-344 4 weeks ago
parent
commit
145af2f67f
  1. 2
      discord/ui/action_row.py
  2. 5
      discord/ui/container.py
  3. 2
      discord/ui/file.py
  4. 2
      discord/ui/media_gallery.py
  5. 2
      discord/ui/section.py

2
discord/ui/action_row.py

@ -126,6 +126,8 @@ class ActionRow(Item[V]):
Parameters
----------
*children: :class:`Item`
The initial children of this action row.
id: Optional[:class:`int`]
The ID of this component. This must be unique across the view.
"""

5
discord/ui/container.py

@ -111,9 +111,8 @@ class Container(Item[V]):
Parameters
----------
children: List[:class:`Item`]
The initial children of this container. Can have up to 10
items.
*children: List[:class:`Item`]
The initial children of this container.
accent_colour: Optional[Union[:class:`.Colour`, :class:`int`]]
The colour of the container. Defaults to ``None``.
accent_color: Optional[Union[:class:`.Colour`, :class:`int`]]

2
discord/ui/file.py

@ -63,7 +63,7 @@ class File(Item[V]):
media: Union[:class:`str`, :class:`.UnfurledMediaItem`]
This file's media. If this is a string it must point to a local
file uploaded within the parent view of this item, and must
meet the ``attachment://file-name.extension`` structure.
meet the ``attachment://filename.extension`` structure.
spoiler: :class:`bool`
Whether to flag this file as a spoiler. Defaults to ``False``.
row: Optional[:class:`int`]

2
discord/ui/media_gallery.py

@ -53,7 +53,7 @@ class MediaGallery(Item[V]):
Parameters
----------
items: List[:class:`.MediaGalleryItem`]
*items: :class:`.MediaGalleryItem`
The initial items of this gallery.
row: Optional[:class:`int`]
The relative row this media gallery belongs to. By default

2
discord/ui/section.py

@ -50,7 +50,7 @@ class Section(Item[V]):
Parameters
----------
children: List[Union[:class:`str`, :class:`TextDisplay`]]
*children: Union[:class:`str`, :class:`TextDisplay`]
The text displays of this section. Up to 3.
accessory: :class:`Item`
The section accessory.

Loading…
Cancel
Save