SuspendingExecutionHandler

fun interface SuspendingExecutionHandler<C : Any>

Suspending version of CommandExecutionHandler for use with coroutines.

NOTE: It is highly advised to not use CommandExecutionCoordinator.SimpleCoordinator together with coroutine support. Consider using AsynchronousCommandExecutionCoordinator instead.

Parameters

C

command sender type

Types

Companion
Link copied to clipboard
object Companion

Functions

asCommandExecutionHandler
Link copied to clipboard
open fun asCommandExecutionHandler(scope: CoroutineScope = GlobalScope, context: CoroutineContext = EmptyCoroutineContext): CommandExecutionHandler<C>

Create a new CommandExecutionHandler for use in building commands, backed by this SuspendingExecutionHandler.

invoke
Link copied to clipboard
abstract suspend operator fun invoke(commandContext: CommandContext<C>)

Handles command execution.