Browse Source

Fix ApplicationCommand documentation

pull/10109/head
dolfies 3 years ago
parent
commit
1b9d4d984f
  1. 14
      discord/commands.py
  2. 1
      docs/api.rst

14
discord/commands.py

@ -67,7 +67,7 @@ class ApplicationCommand(Protocol):
The command's name.
description: :class:`str`
The command's description, if any.
type: :class:`AppCommandType`
type: :class:`.AppCommandType`
The type of application command.
"""
@ -141,6 +141,12 @@ class BaseCommand(ApplicationCommand, Hashable):
The command's version.
default_permission: :class:`bool`
Whether the command is enabled in guilds by default.
name: :class:`str`
The command's name.
description: :class:`str`
The command's description, if any.
type: :class:`AppCommandType`
The type of application command.
"""
__slots__ = (
@ -468,6 +474,12 @@ class SubCommand(SlashMixin):
Attributes
----------
name: :class:`str`
The subcommand's name.
description: :class:`str`
The subcommand's description, if any.
type: :class:`AppCommandType`
The type of application command. Always :attr:`AppCommandType.chat_input`.
parent: :class:`SlashCommand`
The parent command.
options: List[:class:`Option`]

1
docs/api.rst

@ -4528,7 +4528,6 @@ ApplicationCommand
.. autoclass:: BaseCommand()
:members:
:inherited-members:
.. attributetable:: UserCommand

Loading…
Cancel
Save