Skip to content

Commit bf65872

Browse files
authored
fix: parse options (Pycord-Development#2327)
fix: validate parameters
1 parent 9422439 commit bf65872

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

discord/bot.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ def add_application_command(self, command: ApplicationCommand) -> None:
123123
if isinstance(command, SlashCommand) and command.is_subcommand:
124124
raise TypeError("The provided command is a sub-command of group")
125125

126-
if command.cog is MISSING:
127-
command._set_cog(None)
128-
129126
if self._bot.debug_guilds and command.guild_ids is None:
130127
command.guild_ids = self._bot.debug_guilds
131128

discord/commands/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
694694
self.attached_to_group: bool = False
695695

696696
self.options: list[Option] = kwargs.get("options", [])
697+
self._validate_parameters()
697698

698699
try:
699700
checks = func.__commands_checks__

0 commit comments

Comments
 (0)