onRun<O extends OptionDefinition, T> static method

CommandMiddleware<O, T> onRun<O extends OptionDefinition, T>(
  1. OnRun<CommandContext<O, T>> onRun
)

Creates a CommandMiddleware with the given onRun hook.

See MiddlewareHooks.onRun.

Implementation

static CommandMiddleware<O, T> onRun<O extends OptionDefinition, T>(
  final OnRun<CommandContext<O, T>> onRun,
) {
  return withHooks(onRun: onRun);
}