-
-
Notifications
You must be signed in to change notification settings - Fork 482
Closed
Labels
feature requestNew feature requestNew feature request
Description
Summary
It adds name- and description_localizations to subgroups
What is the feature request for?
The core library
The Problem
You cannot use name- and description_localizations because the subgroup does not hand over the ** kwargs to the slash command group
The Ideal Solution
Add **kwargs to slash command subgroup and add it to the SubCommandGroup
The Current Solution
I added it myself and it worked...
Additional Context
Before:
` def create_subgroup(
self,
name: str,
description: Optional[str] = None,
guild_ids: Optional[List[int]] = None
) -> SlashCommandGroup:
if self.parent is not None:
# TODO: Improve this error message
raise Exception("Subcommands can only be nested once")
sub_command_group = SlashCommandGroup(name, description, guild_ids, parent=self)
self.subcommands.append(sub_command_group)
return sub_command_group`
After:
` def create_subgroup(
self,
name: str,
description: Optional[str] = None,
guild_ids: Optional[List[int]] = None,
**kwargs
) -> SlashCommandGroup:
if self.parent is not None:
# TODO: Improve this error message
raise Exception("Subcommands can only be nested once")
sub_command_group = SlashCommandGroup(name, description, guild_ids, parent=self, **kwargs)
self.subcommands.append(sub_command_group)
return sub_command_group`
Metadata
Metadata
Assignees
Labels
feature requestNew feature requestNew feature request