Skip to main content
RegisterSubcommand<Options>(data, subCommandGroupName?): (target, method) => void
Defined in: packages/http-framework/src/lib/interactions/decorators/RegisterSubcommand.ts:32 Registers a subcommand for a chat input command.

Type Parameters

Options

Options extends PieceOptions = PieceOptions

Parameters

data

SubcommandData The subcommand data.

subCommandGroupName?

string | null Optional name of the subcommand group.

Returns

A decorator function that adds the subcommand to the target command. (target, method) => void

Remarks

This decorator must be used in conjunction with RegisterSubcommand.

Example