From 85144ec5e42533ab1d13b18c1bf56ea482733f47 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 14 Apr 2026 13:19:40 -0400 Subject: [PATCH] Fix ActionRow remove and add item not using Item.width --- discord/ui/action_row.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index 38fc3daaa..863564973 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -274,7 +274,7 @@ class ActionRow(Item[V]): item._update_view(self.view) item._parent = self - self._weight += 1 + self._weight += item.width self._children.append(item) return self @@ -298,7 +298,7 @@ class ActionRow(Item[V]): else: if self._view: self._view._add_count(-1) - self._weight -= 1 + self._weight -= item.width return self