From d036e2acec828af26f4712a010c662826a0ca93f Mon Sep 17 00:00:00 2001 From: plun1331 <49261529+plun1331@users.noreply.github.com> Date: Sat, 1 Jan 2022 20:36:05 -0800 Subject: [PATCH] Update commands.py --- discord/commands/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/commands/commands.py b/discord/commands/commands.py index 9431833610..41d032573e 100644 --- a/discord/commands/commands.py +++ b/discord/commands/commands.py @@ -773,7 +773,7 @@ def __repr__(self): class OptionChoice: def __init__(self, name: str, value: Optional[Union[str, int, float]] = None): self.name = name - self.value = value or name + self.value = value if value is not None else name def to_dict(self) -> Dict[str, Union[str, int, float]]: return {"name": self.name, "value": self.value} @@ -857,6 +857,7 @@ def __init__( ) self.name = name self.description = description + self.input_type = SlashCommandOptionType.sub_command_group self.subcommands: List[Union[SlashCommand, SlashCommandGroup]] = self.__initial_commands__ self.guild_ids = guild_ids self.parent = parent