Skip to content

Commit d5d0fb3

Browse files
committed
Rename group.create_group and fix example
1 parent d21446d commit d5d0fb3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

discord/commands/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def wrap(func) -> SlashCommand:
799799

800800
return wrap
801801

802-
def create_group(self, name, description) -> SlashCommandGroup:
802+
def create_subgroup(self, name, description) -> SlashCommandGroup:
803803
if self.parent is not None:
804804
# TODO: Improve this error message
805805
raise Exception("Subcommands can only be nested once")

examples/app_commands/slash_cog_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __init__(self, bot):
1111

1212
greetings = SlashCommandGroup("greetings", "Various greeting from cogs!")
1313

14-
international_greetings = greetings.subgroup(
14+
international_greetings = greetings.create_subgroup(
1515
"international", "International greetings"
1616
)
1717

0 commit comments

Comments
 (0)