We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 75f6a96 + 5f3f571 commit 5a0b81aCopy full SHA for 5a0b81a
interactions/models/command.py
@@ -108,7 +108,10 @@ def __init__(self, **kwargs) -> None:
108
self.type = OptionType(self.type)
109
self._json.update({"type": self.type.value})
110
if self._json.get("options"):
111
- self._json["options"] = [option._json for option in self.options]
+ if all(isinstance(option, dict) for option in self.options):
112
+ self._json["options"] = [option for option in self.options]
113
+ else:
114
+ self._json["options"] = [option._json for option in self.options]
115
if self._json.get("choices"):
116
if isinstance(self._json.get("choices"), dict):
117
self._json["choices"] = [choice for choice in self.choices]
0 commit comments