Decorators API Reference#

Decorators related to this library.

Decorators#

@dawn.slash_command(name: str | None = None, description: str | None = None, *, options: t.Sequence[Option] | None = None, guild_ids: t.Sequence[int] | None = None) t.Callable[[t.Callable], SlashCommand][source]#

This decorator is used to define a slash command.

Parameters
  • name (str) – Name of the slash command, defaults to the function name

  • description (str) – Slash command description, “No Description provided” is used in case this argument wasn’t provided.

  • options (Sequence[.Option]) – List of Option objects for the slash command. These represent discord slash command options.

  • guild_ids (Sequence[int]) – List of guild IDs to add the command to.