npm
Source
Description
Plugin for@wolfstar/http-framework that lets you split slash subcommands (and subcommand groups) into separate command classes, instead of putting every handler method on the parent.
Adapted from @kaname-png/plugin-subcommands-advanced for WolfStar’s HTTP interaction framework.
Installation
Usage
Import the register entrypoint before creating the client:Parent command
Direct subcommand
Grouped subcommand
Constructor options (no decorators)
How it works
@wolfstar/http-framework routes subcommands to methods on the parent command instance. This plugin:
- Lets child command classes register themselves into in-memory registries (by parent name).
- After all command pieces are constructed, rebuilds the parent’s chat-input resolver and
CommandRouter, installing thin delegate methods that call each child’schatInputRun.
hooks.subcommands / hooks.groups helpers unless you are registering the parent imperatively and want to attach builders yourself.
Notes
- HTTP-only: there is no message-command support (unlike the Sapphire original).
- Child classes should not use
@RegisterCommand— only the parent registers the top-level slash command. - Subcommand groups must still be declared on the parent (via
@RegisterCommandbuilder orregisterApplicationCommands).
