@pumpkin-plugins/plugin-kit API / register-commands / registerCommands
Function: registerCommands()
registerCommands<
T>(ctx,tree,handlers,suggestions?):void
Defined in: tools/plugin-kit/src/register-commands.ts:41
Registers a plugin's commands, permissions and per-subcommand permission checks.
Type Parameters
T
T extends CommandTree
Parameters
ctx
Context
The plugin context.
tree
T
The commands, from defineCommands.
handlers
CommandHandlers<T, CommandSender>
What runs each command: the lines to send back, or a thrown CommandFailed.
suggestions?
arguments
Readonly<Partial<Record<string, CommandSuggestionHandler<CommandSender>>>>
register
(handler) => number
Returns
void