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 e0c86cf commit cf73790Copy full SHA for cf73790
discord/ui/modal.py
@@ -200,10 +200,13 @@ def key(item: Item[M]) -> int:
200
components: list[dict[str, Any]] = []
201
for _, group in groupby(children, key=key):
202
labels = False
203
+ toplevel = False
204
children = []
205
for item in group:
206
if item.uses_label() or isinstance(item, Select):
207
labels = True
208
+ elif isinstance(item, (TextDisplay, )):
209
+ toplevel = True
210
children.append(item)
211
if not children:
212
continue
@@ -220,6 +223,8 @@ def key(item: Item[M]) -> int:
220
223
"description": item.description,
221
224
}
222
225
)
226
+ elif toplevel:
227
+ components += [item.to_component_dict() for item in children]
228
else:
229
components.append(
230
{
0 commit comments