We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd60e9b commit 090af2eCopy full SHA for 090af2e
discord/ui/label.py
@@ -88,7 +88,7 @@ def set_item(self, item: Item) -> Self:
88
89
Parameters
90
----------
91
- item: :class:`Item`
+ item: Union[:class:`Item`, :class:`InputText`]
92
The item to set.
93
Currently only supports :class:`~discord.ui.Select` and :class:`~discord.ui.InputText`.
94
@@ -98,7 +98,7 @@ def set_item(self, item: Item) -> Self:
98
An :class:`Item` was not passed.
99
"""
100
101
- if not isinstance(item, Item):
+ if not isinstance(item, (Item, InputText)):
102
raise TypeError(f"expected Item not {item.__class__!r}")
103
if isinstance(item, InputText) and item.label:
104
raise ValueError(f"InputText.label cannot be set inside Label")
0 commit comments