Browse Source

chore: change get_item behaviour

pull/10166/head
DA-344 2 months ago
parent
commit
e1d8a8419b
  1. 2
      discord/ui/section.py
  2. 2
      discord/ui/view.py

2
discord/ui/section.py

@ -220,7 +220,7 @@ class Section(Item[V]):
Optional[:class:`Item`]
The item found, or ``None``.
"""
return _utils_get(self._children, id=id)
return _utils_get(self.walk_children(), id=id)
def clear_items(self) -> Self:
"""Removes all the items from the section.

2
discord/ui/view.py

@ -595,7 +595,7 @@ class BaseView:
Optional[:class:`Item`]
The item found, or ``None``.
"""
return _utils_get(self._children, id=id)
return _utils_get(self.walk_children(), id=id)
async def interaction_check(self, interaction: Interaction, /) -> bool:
"""|coro|

Loading…
Cancel
Save