Skip to content

Commit 340b5d5

Browse files
authored
children
1 parent fb01cfe commit 340b5d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

discord/ui/action_row.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,9 @@ def is_persistent(self) -> bool:
366366

367367
def refresh_component(self, component: ActionRowComponent) -> None:
368368
self._underlying = component
369-
i = 0
370-
for y in component.components:
369+
for i, y in enumerate(component.components):
371370
x = self.children[i]
372371
x.refresh_component(y)
373-
i += 1
374372

375373
def disable_all_items(self, *, exclusions: list[ViewItem] | None = None) -> Self:
376374
"""
@@ -412,7 +410,7 @@ def walk_items(self) -> Iterator[ViewItem]:
412410
yield from self.children
413411

414412
def to_component_dict(self) -> ActionRowPayload:
415-
self._set_components(self.items)
413+
self._set_components(self.children)
416414
return super().to_component_dict()
417415

418416
@classmethod

0 commit comments

Comments
 (0)