Class: SubCommandManager<ArgType, CommandType>
subcommands/src.SubCommandManager
Type parameters
Name | Type |
---|---|
ArgType | extends Args = Args |
CommandType | extends Command <ArgType > = Command <ArgType > |
Constructors
constructor
• new SubCommandManager<ArgType
, CommandType
>(entries
)
Type parameters
Name | Type |
---|---|
ArgType | extends Args <ArgType > = Args |
CommandType | extends Command <ArgType , CommandOptions , CommandType > = Command <ArgType , CommandOptions > |
Parameters
Name | Type |
---|---|
entries | RawEntries <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
Name | Type |
---|---|
context | MessageRunContext <ArgType , CommandType > |
Returns
Promise
<unknown
>
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:26
resolve
▸ Protected
resolve(value
): Entry
<ArgType
, CommandType
>
Parameters
Name | Type |
---|---|
value | string | Entry <ArgType , CommandType > |
Returns
Entry
<ArgType
, CommandType
>
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandManager.ts:45