Class: SubCommandEntryCommand<ArgType, CommandType>
subcommands/src.SubCommandEntryCommand
SubCommandEntryCommand uses other commands as the caller function for subcommands.
example
// here, using `command set` would call the command `modify-settings`.
subCommands: [{
input: 'set',
output: 'modify-settings'
}]
Type parameters
Name | Type |
---|---|
ArgType | extends Args = Args |
CommandType | extends Command <ArgType > = Command <ArgType > |
Hierarchy
SubCommandEntry
<ArgType
,CommandType
>↳
SubCommandEntryCommand
Constructors
constructor
• new SubCommandEntryCommand<ArgType
, CommandType
>(options
)
Type parameters
Name | Type |
---|---|
ArgType | extends Args <ArgType > = Args |
CommandType | extends Command <ArgType , CommandOptions , CommandType > = Command <ArgType , CommandOptions > |
Parameters
Name | Type |
---|---|
options | Options <ArgType , CommandType > |
Inherited from
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:15
Properties
input
• Readonly
input: string
| (context
: MessageRunContext
<ArgType
, CommandType
>) => Awaitable
<string
>
Inherited from
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:12
output
• Readonly
output: string
Inherited from
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:13
Methods
match
▸ match(value
, context
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
value | string |
context | MessageRunContext <ArgType , CommandType > |
Returns
Promise
<boolean
>
Inherited from
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandEntry.ts:21
messageRun
▸ messageRun(context
): unknown
Parameters
Name | Type |
---|---|
context | MessageRunContext <ArgType , CommandType > |
Returns
unknown
Overrides
Defined in
projects/plugins/packages/subcommands/src/lib/SubCommandEntryCommand.ts:19