generated from T99/ts-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Command
Trevor Sears edited this page Jan 6, 2020
·
2 revisions
An interface representing the basic form of an executable command.
Type Parameters:
- C
- N
interface Command<C extends CommandStructure, N extends string = string> { ... }
Returns the name of the Command.
Parameters:
- None
Returns the name of the Command.
getName(): N;
Executes the Command with the provided parameters and within the provided context, returning the resulting value.
Parameters:
- params The parameters with which to execute this Command.
- context The CommandSocket context with which to execute this Command.
Returns The return value of the executed Command.
execute(params: C["params"], context: CommandSocket): Promise<C["return"]>;