registry
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| CommandEntry slashed.registry Command metadata collected by registry. |
||
| CommandRegistry slashed.registry Collect commands for later registration. |
🛈 DocStrings¶
Registry for collecting commands before store initialization.
CommandEntry
dataclass
¶
Command metadata collected by registry.
Source code in src/slashed/registry.py
CommandRegistry
¶
Collect commands for later registration.
Source code in src/slashed/registry.py
__init__
¶
command
¶
command(
*,
name: str | None = None,
description: str | None = None,
category: str = "general",
usage: str | None = None,
help_text: str | None = None,
completer: CompletionProvider | Callable[[], CompletionProvider] | None = None,
condition: Callable[[], bool] | None = None,
) -> Callable[[TCommandFunc], TCommandFunc]
Decorator to collect a command for later registration.
Source code in src/slashed/registry.py
register_to
¶
register_to(store: CommandStore) -> None
Register all collected commands to a store.