@@ -295,6 +295,37 @@ async def call_after_hooks(self, ctx: ApplicationContext) -> None:
295
295
await hook (ctx )
296
296
297
297
class SlashCommand (ApplicationCommand ):
298
+ r"""A class that implements the protocol for a slash command.
299
+
300
+ These are not created manually, instead they are created via the
301
+ decorator or functional interface.
302
+
303
+ Attributes
304
+ -----------
305
+ name: :class:`str`
306
+ The name of the command.
307
+ callback: :ref:`coroutine <coroutine>`
308
+ The coroutine that is executed when the command is called.
309
+ description: Optional[:class:`str`]
310
+ The description for the command.
311
+ guild_ids: Optional[List[:class:`int`]]
312
+ The ids of the guilds where this command will be registered.
313
+ options: List[:class:`Option`]
314
+ The parameters for this command.
315
+ default_permission: :class:`bool`
316
+ Whether the command is enabled by default when it is added to a guild.
317
+ permissions: List[:class:`Permission`]
318
+ The permissions for this command.
319
+ cog: Optional[:class:`Cog`]
320
+ The cog that this command belongs to. ``None`` if there isn't one.
321
+ checks: List[Callable[[:class:`.Context`], :class:`bool`]]
322
+ A list of predicates that verifies if the command could be executed
323
+ with the given :class:`.ApplicationContext` as the sole parameter. If an exception
324
+ is necessary to be thrown to signal failure, then one inherited from
325
+ :exc:`.CommandError` should be used. Note that if the checks fail then
326
+ :exc:`.CheckFailure` exception is raised to the :func:`.on_application_command_error`
327
+ event.
328
+ """
298
329
type = 1
299
330
300
331
def __new__ (cls , * args , ** kwargs ) -> SlashCommand :
@@ -348,7 +379,6 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
348
379
def parse_options (self , params ) -> List [Option ]:
349
380
final_options = []
350
381
351
- params = self ._get_signature_parameters ()
352
382
if list (params .items ())[0 ][0 ] == "self" :
353
383
temp = list (params .items ())
354
384
temp .pop (0 )
0 commit comments