Skip to main content

Class: SubCommandEntry<ArgType, CommandType>

@sapphire/plugin-subcommands.SubCommandEntry

since 1.0.0 SubCommandEntry represents a basic subcommand entry. Methods and command names are supported in core.

see SubCommandEntryCommand

see SubCommandEntryMethod

Type parameters

NameType
ArgTypeextends Args = Args
CommandTypeextends Command<ArgType> = Command<ArgType>

Hierarchy

Constructors

constructor

โ€ข new SubCommandEntry<ArgType, CommandType>(options)

Type parameters

NameType
ArgTypeextends Args<ArgType> = Args
CommandTypeextends Command<ArgType, CommandOptions, CommandType> = Command<ArgType, CommandOptions>

Parameters

NameType
optionsOptions<ArgType, CommandType>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:15

Properties

input

โ€ข Readonly input: string | (context: MessageRunContext<ArgType, CommandType>) => Awaitable<string>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:12


output

โ€ข Readonly output: string

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:13

Methods

match

โ–ธ match(value, context): Promise<boolean>

Parameters

NameType
valuestring
contextMessageRunContext<ArgType, CommandType>

Returns

Promise<boolean>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:21


messageRun

โ–ธ Abstract messageRun(context): unknown

Parameters

NameType
contextMessageRunContext<ArgType, CommandType>

Returns

unknown

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:27