Skip to content

Commit 0acb103

Browse files
authored
update _component_to_item
1 parent 9ca373a commit 0acb103

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

discord/ui/view.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ def _component_to_item(component: Component) -> Item[V]:
127127

128128
return Container.from_component(component)
129129
if isinstance(component, ActionRowComponent):
130-
# Handle ActionRow.children manually, or design ui.ActionRow?
130+
from .action_row import ActionRow
131131

132-
return component
132+
return ActionRow.from_component(component)
133133
if isinstance(component, LabelComponent):
134-
ret = _component_to_item(component.component)
135-
ret.label = component.label
136-
ret.description = component.description
137-
return ret
134+
from .label import Label
135+
136+
return Label.from_component(component)
138137
return Item.from_component(component)
139138

140139

0 commit comments

Comments
 (0)