Skip to content

Commit 26c73da

Browse files
Add a note in SlashCommand doc
1 parent 7da9d4d commit 26c73da

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

discord/commands/commands.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,14 @@ class SlashCommand(ApplicationCommand):
316316
Whether the command is enabled by default when it is added to a guild.
317317
permissions: List[:class:`Permission`]
318318
The permissions for this command.
319+
320+
.. note::
321+
322+
If this is not empty then default_permissions will be set to False.
323+
319324
cog: Optional[:class:`Cog`]
320325
The cog that this command belongs to. ``None`` if there isn't one.
321-
checks: List[Callable[[:class:`.Context`], :class:`bool`]]
326+
checks: List[Callable[[:class:`.ApplicationContext`], :class:`bool`]]
322327
A list of predicates that verifies if the command could be executed
323328
with the given :class:`.ApplicationContext` as the sole parameter. If an exception
324329
is necessary to be thrown to signal failure, then one inherited from
@@ -356,7 +361,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
356361
self.cog = None
357362

358363
params = self._get_signature_parameters()
359-
self.options = self.parse_options(params)
364+
self.options = self._parse_options(params)
360365

361366
try:
362367
checks = func.__commands_checks__
@@ -376,7 +381,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
376381
self.default_permission = False
377382

378383

379-
def parse_options(self, params) -> List[Option]:
384+
def _parse_options(self, params) -> List[Option]:
380385
final_options = []
381386

382387
if list(params.items())[0][0] == "self":

0 commit comments

Comments
 (0)