From e1d8a8419b6feec59a24ab66f773c1128be54ebb Mon Sep 17 00:00:00 2001 From: DA-344 <108473820+DA-344@users.noreply.github.com> Date: Sun, 1 Jun 2025 12:59:34 +0200 Subject: [PATCH] chore: change get_item behaviour --- discord/ui/section.py | 2 +- discord/ui/view.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ui/section.py b/discord/ui/section.py index adda44b40..708ef68c5 100644 --- a/discord/ui/section.py +++ b/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. diff --git a/discord/ui/view.py b/discord/ui/view.py index 10519cf5a..273c5603e 100644 --- a/discord/ui/view.py +++ b/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|