We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a4010 commit 1427e10Copy full SHA for 1427e10
discord/bot.py
@@ -118,6 +118,12 @@ def add_application_command(self, command: ApplicationCommand) -> None:
118
command: :class:`.ApplicationCommand`
119
The command to add.
120
"""
121
+ try:
122
+ if getattr("parent", command) is not None:
123
+ raise TypeError("The provided command is a sub-command of group")
124
+ except AttributeError:
125
+ pass
126
+
127
if self.debug_guilds and command.guild_ids is None:
128
command.guild_ids = self.debug_guilds
129
self._pending_application_commands.append(command)
0 commit comments