Package net.mamoe.mirai.console.command.resolve

Types

CommandCallInterceptor
Link copied to clipboard
interface CommandCallInterceptor

指令解析和调用拦截器. 用于在指令各解析阶段拦截或转换调用.

CommandCallResolver
Link copied to clipboard
interface CommandCallResolver

The resolver converting a CommandCall into ResolvedCommandCall based on registered []

CommandResolveResult
Link copied to clipboard
class CommandResolveResult
InterceptedReason
Link copied to clipboard
interface InterceptedReason

拦截原因

InterceptResult
Link copied to clipboard
class InterceptResult<T>
ResolvedCommandCall
Link copied to clipboard
interface ResolvedCommandCall

The resolved CommandCall.

ResolvedCommandCallImpl
Link copied to clipboard
class ResolvedCommandCallImpl(caller: CommandSender, callee: Command, calleeSignature: CommandSignature, rawValueArguments: List<CommandValueArgument>, context: CommandArgumentContext) : ResolvedCommandCall

Default implementation.

Functions

call
Link copied to clipboard
inline suspend fun ResolvedCommandCall.call()

Invoke this resolved call.

fold
Link copied to clipboard
inline fun <R> CommandResolveResult.fold(onSuccess: (ResolvedCommandCall?) -> R, onFailure: (CommandExecuteResult.Failure) -> R): R
inline fun <T, R> InterceptResult<T>.fold(onIntercepted: (reason: InterceptedReason) -> R, otherwise: (T) -> R): R
getOrElse
Link copied to clipboard
inline fun <T : R, R> InterceptResult<T>.getOrElse(onIntercepted: (reason: InterceptedReason) -> R): R
InterceptedReason
Link copied to clipboard
inline fun InterceptedReason(message: String): InterceptedReason

创建一个 InterceptedReason