mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-18 04:00:39 +00:00
Correct supported types in docs for modal components
This commit is contained in:
@@ -131,6 +131,7 @@ class Component:
|
|||||||
- :class:`FileComponent`
|
- :class:`FileComponent`
|
||||||
- :class:`SeparatorComponent`
|
- :class:`SeparatorComponent`
|
||||||
- :class:`Container`
|
- :class:`Container`
|
||||||
|
- :class:`LabelComponent`
|
||||||
|
|
||||||
This class is abstract and cannot be instantiated.
|
This class is abstract and cannot be instantiated.
|
||||||
|
|
||||||
|
@@ -50,6 +50,8 @@ V = TypeVar('V', bound='BaseView', covariant=True)
|
|||||||
class Label(Item[V]):
|
class Label(Item[V]):
|
||||||
"""Represents a UI label within a modal.
|
"""Represents a UI label within a modal.
|
||||||
|
|
||||||
|
This is a top-level layout component that can only be used on :class:`Modal`.
|
||||||
|
|
||||||
.. versionadded:: 2.6
|
.. versionadded:: 2.6
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@@ -60,7 +62,7 @@ class Label(Item[V]):
|
|||||||
description: Optional[:class:`str`]
|
description: Optional[:class:`str`]
|
||||||
The description text to display right below the label text.
|
The description text to display right below the label text.
|
||||||
Can only be up to 100 characters.
|
Can only be up to 100 characters.
|
||||||
component: Union[:class:`discord.ui.TextInput`, :class:`discord.ui.Select`]
|
component: :class:`Item`
|
||||||
The component to display below the label.
|
The component to display below the label.
|
||||||
id: Optional[:class:`int`]
|
id: Optional[:class:`int`]
|
||||||
The ID of the component. This must be unique across the view.
|
The ID of the component. This must be unique across the view.
|
||||||
@@ -74,8 +76,7 @@ class Label(Item[V]):
|
|||||||
The description text to display right below the label text.
|
The description text to display right below the label text.
|
||||||
Can only be up to 100 characters.
|
Can only be up to 100 characters.
|
||||||
component: :class:`Item`
|
component: :class:`Item`
|
||||||
The component to display below the label. Currently only
|
The component to display below the label.
|
||||||
supports :class:`TextInput` and :class:`Select`.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__item_repr_attributes__: Tuple[str, ...] = (
|
__item_repr_attributes__: Tuple[str, ...] = (
|
||||||
|
@@ -43,7 +43,8 @@ __all__ = ('TextDisplay',)
|
|||||||
class TextDisplay(Item[V]):
|
class TextDisplay(Item[V]):
|
||||||
"""Represents a UI text display.
|
"""Represents a UI text display.
|
||||||
|
|
||||||
This is a top-level layout component that can only be used on :class:`LayoutView` or :class:`Section`.
|
This is a top-level layout component that can only be used on :class:`LayoutView`,
|
||||||
|
:class:`Section`, :class:`Container`, or :class:`Modal`.
|
||||||
|
|
||||||
.. versionadded:: 2.6
|
.. versionadded:: 2.6
|
||||||
|
|
||||||
|
@@ -53,6 +53,8 @@ V = TypeVar('V', bound='BaseView', covariant=True)
|
|||||||
class TextInput(Item[V]):
|
class TextInput(Item[V]):
|
||||||
"""Represents a UI text input.
|
"""Represents a UI text input.
|
||||||
|
|
||||||
|
This a top-level layout component that can only be used in :class:`Label`.
|
||||||
|
|
||||||
.. container:: operations
|
.. container:: operations
|
||||||
|
|
||||||
.. describe:: str(x)
|
.. describe:: str(x)
|
||||||
|
Reference in New Issue
Block a user