Skip to content

Commit

Permalink
fix: parse options (Pycord-Development#2327)
Browse files Browse the repository at this point in the history
fix: validate parameters
  • Loading branch information
Dorukyum authored Jan 22, 2024
1 parent 9422439 commit bf65872
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ def add_application_command(self, command: ApplicationCommand) -> None:
if isinstance(command, SlashCommand) and command.is_subcommand:
raise TypeError("The provided command is a sub-command of group")

if command.cog is MISSING:
command._set_cog(None)

if self._bot.debug_guilds and command.guild_ids is None:
command.guild_ids = self._bot.debug_guilds

Expand Down
1 change: 1 addition & 0 deletions discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
self.attached_to_group: bool = False

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

try:
checks = func.__commands_checks__
Expand Down

0 comments on commit bf65872

Please sign in to comment.