Skip to content

Commit d61968b

Browse files
committed
fix: Don't hardcode the possible subcomponents of a section
1 parent c656aa4 commit d61968b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/models/discord/components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ def __init__(
816816
@classmethod
817817
def from_dict(cls, data: dict) -> "SectionComponent":
818818
return cls(
819-
components=TextDisplayComponent.from_list(data["components"]), accessory=Button.from_dict(data["accessory"])
819+
components=[BaseComponent.from_dict_factory(component) for component in data["components"]], accessory=BaseComponent.from_dict_factory(data["accessory"]) # type: ignore
820820
)
821821

822822
def __repr__(self) -> str:

0 commit comments

Comments
 (0)