|
43 | 43 | from .view import BaseView
|
44 | 44 |
|
45 | 45 | I = TypeVar("I", bound="Item")
|
46 |
| -T = TypeVar("IF", bound="ItemInterface", covariant=True) |
| 46 | +T = TypeVar("T", bound="ItemInterface", covariant=True) |
47 | 47 | V = TypeVar("V", bound="BaseView", covariant=True)
|
48 | 48 | M = TypeVar("M", bound="BaseModal", covariant=True)
|
49 | 49 | ItemCallbackType = Callable[[Any, I, Interaction], Coroutine[Any, Any, Any]]
|
|
52 | 52 | class Item(Generic[T]):
|
53 | 53 | """Represents the base UI item that all UI components inherit from.
|
54 | 54 |
|
55 |
| - The following are the original items supported in :class:`discord.ui.View`: |
56 |
| -
|
57 |
| - - :class:`discord.ui.Button` |
58 |
| - - :class:`discord.ui.Select` |
59 |
| -
|
60 |
| - And the following are new items under the "Components V2" specification for use in :class:`discord.ui.DesignerView`: |
61 |
| -
|
62 |
| - - :class:`discord.ui.Section` |
63 |
| - - :class:`discord.ui.TextDisplay` |
64 |
| - - :class:`discord.ui.Thumbnail` |
65 |
| - - :class:`discord.ui.MediaGallery` |
66 |
| - - :class:`discord.ui.File` |
67 |
| - - :class:`discord.ui.Separator` |
68 |
| - - :class:`discord.ui.Container` |
69 |
| -
|
70 | 55 | .. versionadded:: 2.0
|
71 | 56 |
|
72 | 57 | .. versionchanged:: 2.7
|
73 |
| - Added V2 Components. |
| 58 | + Now used as base class for :class:`ViewItem` and :class:`ModalItem`. |
74 | 59 | """
|
75 | 60 |
|
76 | 61 | __item_repr_attributes__: tuple[str, ...] = ("id",)
|
@@ -253,6 +238,10 @@ class ModalItem(Item[M]):
|
253 | 238 | - :class:`discord.ui.Label`
|
254 | 239 | - :class:`discord.ui.TextDisplay`
|
255 | 240 |
|
| 241 | + And :class:`discord.ui.Label` should be used in :class:`discord.ui.DesignerModal` to support the following items: |
| 242 | + - :class:`discord.ui.InputText` |
| 243 | + - :class:`discord.ui.Select` |
| 244 | +
|
256 | 245 | .. versionadded:: 2.7
|
257 | 246 | """
|
258 | 247 |
|
|
0 commit comments