Skip to content

Commit 63da813

Browse files
Dorukyumpre-commit-ci[bot]Lulalaby
authored
chore: improve nesting error message (#2275)
* chore: improve subgroup limit error message * Changelog * style(pre-commit): auto fixes from pre-commit.com hooks * Update discord/commands/core.py Co-authored-by: Lala Sabathil <[email protected]> Signed-off-by: Dorukyum <[email protected]> * Update core.py * style(pre-commit): auto fixes from pre-commit.com hooks * Update CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: Dorukyum <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]>
1 parent e25527f commit 63da813

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ These changes are available on the `master` branch, but have not yet been releas
239239
([#2170](https://github.com/Pycord-Development/pycord/pull/2170))
240240
- `BridgeOption` must now be used for arguments in bridge commands.
241241
([#2252](https://github.com/Pycord-Development/pycord/pull/2252))
242+
- Changed the error message that appears when attempting to add a subcommand group to a
243+
subcommand group. ([#2275](https://github.com/Pycord-Development/pycord/pull/2275))
242244

243245
### Removed
244246

discord/commands/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,8 +1425,7 @@ def create_subgroup(
14251425
"""
14261426

14271427
if self.parent is not None:
1428-
# TODO: Improve this error message
1429-
raise Exception("a subgroup cannot have a subgroup")
1428+
raise Exception("A subcommand group cannot be added to a subcommand group")
14301429

14311430
sub_command_group = SlashCommandGroup(
14321431
name, description, guild_ids, parent=self, **kwargs

0 commit comments

Comments
 (0)