JavaCommandContext

class JavaCommandContext(context: ICommandContext, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Contains actions that can be taken in response to a command

Constructors

Link copied to clipboard
fun JavaCommandContext(context: ICommandContext, scope: CoroutineScope = CoroutineScope(Dispatchers.Default))

Functions

Link copied to clipboard
fun acknowledge(): Future<Boolean>

Acknowledge that the command has been executed

Link copied to clipboard
fun error(errorInfo: IMessageError): Future<Boolean>
fun error(statusCode: Long, message: String): Future<Boolean>

Respond to the command with an error

Link copied to clipboard
fun getCommandId(): String

ID of the associated command

Link copied to clipboard
fun hasExecuted(): Boolean

Indicates if the command has already been executed