AppCommandRunner
AppCommandRunner
Handles the execution of application commands for CommandKit. Manages middleware execution, environment setup, and command invocation.
Signature
class AppCommandRunner {
constructor(handler: AppCommandHandler)
runCommand(prepared: PreparedAppCommandExecution, source: Interaction | Message, options?: RunCommandOptions) => ;
getExecutionMode(source: Interaction | Message) => CommandExecutionMode;
}
constructor
method
(handler: AppCommandHandler) => AppCommandRunner
Creates a new AppCommandRunner instance.
runCommand
method
(prepared: PreparedAppCommandExecution, source: Interaction | Message, options?: RunCommandOptions) =>
Executes a prepared command with middleware support and environment setup. Handles the complete command lifecycle including before/after middleware execution.
getExecutionMode
method
(source: Interaction | Message) => CommandExecutionMode
Determines the execution mode based on the source of the command.