Skip to content

Commit 2dc1242

Browse files
committed
fix: Fix actionrow SelectMenu/SelectOption json parsing.
1 parent 45d968c commit 2dc1242

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interactions/models/component.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,10 @@ def __init__(self, **kwargs) -> None:
348348
self.type = ComponentType.ACTION_ROW
349349
for component in self.components:
350350
if isinstance(component, SelectMenu):
351-
component._json["options"] = [option._json for option in component._json["options"]]
351+
component._json["options"] = [
352+
option._json if isinstance(option, SelectOption) else option
353+
for option in component._json["options"]
354+
]
352355
self.components = (
353356
[Component(**component._json) for component in self.components]
354357
if self._json.get("components")

0 commit comments

Comments
 (0)