CommandEventArgs

data class CommandEventArgs(    val msgid: Int,     val command: Command,     val context: ICommandContext) : EventArgs

CommandEventArgs is a data class that contains a Command and the associated ICommandContext.

Parameters

command

the command data

context

ICommandContext that can be used to acknowledge this command

Constructors

Link copied to clipboard
fun CommandEventArgs(    msgid: Int,     command: Command,     context: ICommandContext)

Functions

Link copied to clipboard
suspend fun acknowledge(): Boolean

Acknowledge that the command has been executed

suspend fun acknowledge(action: (cmd: Command, ctx: ICommandContext) -> Unit): Boolean

Execute the action and respond with an acknowledgement or error at the appropriate time given the CommandAcknowledgementType of the command

Link copied to clipboard
suspend fun error(errorInfo: IMessageError): Boolean
suspend fun error(status: Long, message: String): Boolean

Respond to the command with an error

Properties

Link copied to clipboard
val command: Command
Link copied to clipboard
val context: ICommandContext
Link copied to clipboard
val msgid: Int