Skip to main content

Class: SubCommandManager<ArgType, CommandType>

subcommands/src.SubCommandManager

Type parameters

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

Constructors

constructor

new SubCommandManager<ArgType, CommandType>(entries)

Type parameters

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

Parameters

NameType
entriesRawEntries<ArgType, CommandType>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:10

Properties

default

Private Readonly default: null | SubCommandEntry<ArgType, CommandType> = null

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:8


entries

Private Readonly entries: SubCommandEntry<ArgType, CommandType>[] = []

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:7


handlers

Static Readonly handlers: Map<string, typeof SubCommandEntryCommand>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:50

Methods

messageRun

messageRun(context): Promise<unknown>

Parameters

NameType
contextMessageRunContext<ArgType, CommandType>

Returns

Promise<unknown>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:26


resolve

Protected resolve(value): Entry<ArgType, CommandType>

Parameters

NameType
valuestring | Entry<ArgType, CommandType>

Returns

Entry<ArgType, CommandType>

Defined in

projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:45