From 6e302a37ac3261d0230ee7e87958f476b4918652 Mon Sep 17 00:00:00 2001 From: DA-344 <108473820+DA-344@users.noreply.github.com> Date: Mon, 19 May 2025 20:37:17 +0200 Subject: [PATCH] fix: is_persistent returning wrong values --- discord/ui/action_row.py | 2 +- discord/ui/section.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index 764ce1dc0..167d1664f 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -205,7 +205,7 @@ class ActionRow(Item[V]): return any(c.is_dispatchable() for c in self.children) def is_persistent(self) -> bool: - return self.is_dispatchable() and all(c.is_persistent() for c in self.children) + return all(c.is_persistent() for c in self.children) def _update_children_view(self, view: LayoutView) -> None: for child in self._children: diff --git a/discord/ui/section.py b/discord/ui/section.py index c38040346..dd04431e6 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -118,7 +118,7 @@ class Section(Item[V]): return self.accessory.is_dispatchable() def is_persistent(self) -> bool: - return self.is_dispatchable() and self.accessory.is_persistent() + return self.accessory.is_persistent() def walk_children(self) -> Generator[Item[V], None, None]: """An iterator that recursively walks through all the children of this section.