Skip to content
5 changes: 5 additions & 0 deletions interactions/api/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ def _check_auto(option: dict) -> Optional[Tuple[str]]:
return _check

__kwargs[sub_option["name"]] = sub_option["value"]

elif _data.get("type") and _data["type"] == OptionType.SUB_COMMAND:
# sub_command_groups must have options so there is no extra check needed for those
__kwargs["sub_command"] = _data["name"]

elif _data.get("value") and _data.get("name"):
__kwargs[_data["name"]] = _data["value"]

Expand Down
1 change: 1 addition & 0 deletions interactions/api/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Attachment(DictSerializerMixin):
"""

__slots__ = (
"_client",
"_json",
"id",
"filename",
Expand Down
2 changes: 1 addition & 1 deletion interactions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def __check_sub_command(_sub_command: Option, _sub_group: Option = MISSING):
raise InteractionException(
11, message="Descriptions must be less than 100 characters."
)
if _sub_command.options is not MISSING:
if _sub_command.options is not MISSING and _sub_command.options:
if len(_sub_command.options) > 25:
raise InteractionException(
11, message="Your sub command must have less than 25 options."
Expand Down