Skip to content

Commit 38352c2

Browse files
authored
actual fix
1 parent 8a9fe8f commit 38352c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

discord/ui/modal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def __init__(
7070
custom_id: str | None = None,
7171
timeout: float | None = None,
7272
) -> None:
73-
self._children: list[ModalItem] = list(children)
7473
if not isinstance(custom_id, str) and custom_id is not None:
7574
raise TypeError(
7675
f"expected custom_id to be str, not {custom_id.__class__.__name__}"
@@ -79,6 +78,8 @@ def __init__(
7978
if len(title) > 45:
8079
raise ValueError("title must be 45 characters or fewer")
8180
super().__init__(timeout=timeout)
81+
for item in children:
82+
self.add_item(item)
8283
self._title = title
8384
self.loop = asyncio.get_event_loop()
8485

0 commit comments

Comments
 (0)