Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion interactions/models/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def __init__(self, **kwargs) -> None:
self.type = OptionType(self.type)
self._json.update({"type": self.type.value})
if self._json.get("options"):
self._json["options"] = [option._json for option in self.options]
if all(isinstance(option, dict) for option in self.options):
self._json["options"] = [option for option in self.options]
else:
self._json["options"] = [option._json for option in self.options]
if self._json.get("choices"):
if isinstance(self._json.get("choices"), dict):
self._json["choices"] = [choice for choice in self.choices]
Expand Down