From 5f3f57141ec4177bd333230d6e0c6ee3a1080721 Mon Sep 17 00:00:00 2001 From: Meido Date: Sat, 18 Dec 2021 16:09:30 +0700 Subject: [PATCH] (f) fixed correct getting options in command --- interactions/models/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interactions/models/command.py b/interactions/models/command.py index 7e095c767..86d067db7 100644 --- a/interactions/models/command.py +++ b/interactions/models/command.py @@ -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]