Skip to content

Commit

Permalink
Merge pull request Pycord-Development#471 from Luc1412/command-options
Browse files Browse the repository at this point in the history
add support for passing options in SlashCommand.__init__
  • Loading branch information
Lulalaby authored Nov 19, 2021
2 parents 92f26c2 + 5e61daf commit f51a1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
self.cog = None

params = self._get_signature_parameters()
self.options: List[Option] = self._parse_options(params)
self.options: List[Option] = kwargs.get('options') or self._parse_options(params)

try:
checks = func.__commands_checks__
Expand Down

0 comments on commit f51a1ae

Please sign in to comment.