mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-09-21 03:27:42 +00:00
Fix ActionRow remove and add item not using Item.width
This commit is contained in:
@@ -274,7 +274,7 @@ class ActionRow(Item[V]):
|
|||||||
|
|
||||||
item._update_view(self.view)
|
item._update_view(self.view)
|
||||||
item._parent = self
|
item._parent = self
|
||||||
self._weight += 1
|
self._weight += item.width
|
||||||
self._children.append(item)
|
self._children.append(item)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@@ -298,7 +298,7 @@ class ActionRow(Item[V]):
|
|||||||
else:
|
else:
|
||||||
if self._view:
|
if self._view:
|
||||||
self._view._add_count(-1)
|
self._view._add_count(-1)
|
||||||
self._weight -= 1
|
self._weight -= item.width
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user