CommandExecuteResult

sealed class CommandExecuteResult

指令的执行返回

Types

ExecutionFailed
Link copied to clipboard
class ExecutionFailed(exception: Throwable, command: Command, call: CommandCall, resolvedCall: ResolvedCommandCall) : CommandExecuteResult.Failure

指令方法调用过程出现了错误

Failure
Link copied to clipboard
abstract class Failure : CommandExecuteResult

指令执行失败

IllegalArgument
Link copied to clipboard
class IllegalArgument(exception: IllegalCommandArgumentException, command: Command, call: CommandCall, resolvedCall: ResolvedCommandCall) : CommandExecuteResult.Failure

执行执行时发生了一个非法参数错误

Intercepted
Link copied to clipboard
class Intercepted(call: CommandCall?, resolvedCall: ResolvedCommandCall?, command: Command?, reason: InterceptedReason) : CommandExecuteResult.Failure

没有匹配的指令

PermissionDenied
Link copied to clipboard
class PermissionDenied(command: Command, call: CommandCall, resolvedCall: ResolvedCommandCall) : CommandExecuteResult.Failure

权限不足

Success
Link copied to clipboard
class Success(command: Command, call: CommandCall, resolvedCall: ResolvedCommandCall) : CommandExecuteResult

指令执行成功

UnmatchedSignature
Link copied to clipboard
class UnmatchedSignature(command: Command, call: CommandCall, failureReasons: List<UnmatchedCommandSignature>) : CommandExecuteResult.Failure

没有匹配的指令

UnresolvedCommand
Link copied to clipboard
class UnresolvedCommand(call: CommandCall?) : CommandExecuteResult.Failure

没有匹配的指令

Properties

call
Link copied to clipboard
abstract val call: CommandCall?

解析的 CommandCall (如果匹配到)

command
Link copied to clipboard
abstract val command: Command?

尝试执行的指令 (如果匹配到)

exception
Link copied to clipboard
abstract val exception: Throwable?

指令执行时发生的错误 (如果有)

resolvedCall
Link copied to clipboard
abstract val resolvedCall: ResolvedCommandCall?

解析的 ResolvedCommandCall (如果匹配到)

Inheritors

Success
Link copied to clipboard
Failure
Link copied to clipboard

Extensions