Skip to content

Commit cf73790

Browse files
authored
check
1 parent e0c86cf commit cf73790

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

discord/ui/modal.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,13 @@ def key(item: Item[M]) -> int:
200200
components: list[dict[str, Any]] = []
201201
for _, group in groupby(children, key=key):
202202
labels = False
203+
toplevel = False
203204
children = []
204205
for item in group:
205206
if item.uses_label() or isinstance(item, Select):
206207
labels = True
208+
elif isinstance(item, (TextDisplay, )):
209+
toplevel = True
207210
children.append(item)
208211
if not children:
209212
continue
@@ -220,6 +223,8 @@ def key(item: Item[M]) -> int:
220223
"description": item.description,
221224
}
222225
)
226+
elif toplevel:
227+
components += [item.to_component_dict() for item in children]
223228
else:
224229
components.append(
225230
{

0 commit comments

Comments
 (0)