Skip to content

Commit 2f03485

Browse files
committed
feat(actionrow): add delitem
2 parents ecf9b53 + 4fdde73 commit 2f03485

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

discord_components/component.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ def __getitem__(self, index: int) -> Component:
400400
def __setitem__(self, index: int, value: Component):
401401
self._components[index] = value
402402

403+
def __delitem__(self, key: int):
404+
del self._components[key]
405+
403406
def to_dict(self) -> dict:
404407
data = {"type": 1, "components": [component.to_dict() for component in self.components]}
405408
return data

0 commit comments

Comments
 (0)