From 97006066c06de47d995975c02b53955b4ca74818 Mon Sep 17 00:00:00 2001 From: DA344 <108473820+DA-344@users.noreply.github.com> Date: Sun, 9 Mar 2025 23:22:37 +0100 Subject: [PATCH] chore: Update Container._update_store_data --- discord/ui/container.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discord/ui/container.py b/discord/ui/container.py index 9750010ad..d546d593a 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -97,6 +97,7 @@ class Container(Item[V]): row: Optional[int] = None, id: Optional[int] = None, ) -> None: + self.__dispatchable: List[Item[V]] = [] self._children: List[Item[V]] = self._init_children() if children is not MISSING: @@ -130,6 +131,7 @@ class Container(Item[V]): parent._children.append(item) # we donnot append it to the children list because technically these buttons and # selects are not from the container but the action row itself. + self.__dispatchable.append(item) return children @@ -211,7 +213,7 @@ class Container(Item[V]): dynamic_items: Dict[Any, Type[DynamicItem]], ) -> bool: is_fully_dynamic = True - for item in self._children: + for item in self.__dispatchable: if isinstance(item, DynamicItem): pattern = item.__discord_ui_compiled_template__ dynamic_items[pattern] = item.__class__