File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,6 @@ def add_item(self, item: Item) -> None:
8585 Maximum number of items has been exceeded (10).
8686 """
8787
88- if len (self .items ) >= 10 :
89- raise ValueError ("maximum number of children exceeded" )
90-
9188 if not isinstance (item , Item ):
9289 raise TypeError (f"expected Item not { item .__class__ !r} " )
9390
@@ -98,8 +95,7 @@ def add_item(self, item: Item) -> None:
9895 if item ._underlying .is_v2 ():
9996 self ._underlying .components .append (item ._underlying )
10097 else :
101- for i in range (len (self ._underlying .components ) - 1 , 0 , - 1 ):
102- row = self ._underlying .components [i ]
98+ for row in reversed (self ._underlying .components ):
10399 if (
104100 isinstance (row , ActionRow ) and row .width + item .width <= 5
105101 ): # If a valid ActionRow exists
Original file line number Diff line number Diff line change @@ -62,6 +62,6 @@ def to_component_dict(self) -> SeparatorComponentPayload:
6262
6363 @classmethod
6464 def from_component (cls : type [S ], component : SeparatorComponent ) -> S :
65- return cls (component .content )
65+ return cls (divider = component .divider , spacing = component . spacing )
6666
6767 callback = None
You can’t perform that action at this time.
0 commit comments