Skip to content

Commit

Permalink
fix subgroup handling (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
zartio-com authored Mar 16, 2024
1 parent 02e4b48 commit 6d711c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycord/multicog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def _find_group(self, name: str) -> Optional[discord.SlashCommandGroup]:
if name.count(" ") == 0:
return get(self._pending_application_commands, name=name)

group_name, subgroup_name = name.split("")
group_name, subgroup_name = name.split(" ")
if group := get(self._pending_application_commands, name=group_name):
return get(group.subcommand, name=subgroup_name)
return get(group.subcommands, name=subgroup_name)

def _get_meta(self, command: discord.SlashCommand) -> Optional[MulticogMeta]:
"""A helper funcion to retrieve multicog meta information of a command."""
Expand Down

0 comments on commit 6d711c2

Please sign in to comment.