Package net.mamoe.mirai.console.command.descriptor

Types

Link copied to clipboard
abstract class AbstractCommandParameter<T> : CommandParameter<T>
Link copied to clipboard
Link copied to clipboard
abstract class AbstractCommandValueArgumentParser<T : Any> : CommandValueArgumentParser<T>
Link copied to clipboard
sealed class ArgumentAcceptance
Link copied to clipboard

当字符串内容为(不区分大小写) "true", "yes", "enabled", "on", "1"

Link copied to clipboard
Link copied to clipboard
interface CommandArgumentContext

指令参数环境, 即 CommandValueArgumentParser 的集合, 用于 CompositeCommandSimpleCommand.

Link copied to clipboard
interface CommandArgumentContextAware
Link copied to clipboard
class CommandArgumentParserException @JvmOverloads constructor(message: String, cause: Throwable? = null) : IllegalCommandArgumentException

在解析参数时遇到的 正常 错误. 如参数不符合规范等.

Link copied to clipboard
Link copied to clipboard
open class CommandDeclarationException : RuntimeException
Link copied to clipboard
interface CommandParameter<T>

Inherited instances must be CommandValueParameter or CommandReceiverParameter

Link copied to clipboard
Link copied to clipboard
open class CommandResolutionException : RuntimeException
Link copied to clipboard
interface CommandSignature

指令签名. 表示指令定义的需要的参数.

Link copied to clipboard
open class CommandSignatureFromKFunctionImpl(    val receiverParameter: CommandReceiverParameter<*>?,     val valueParameters: List<AbstractCommandValueParameter<*>>,     val originFunction: KFunction<*>,     onCall: suspend CommandSignatureFromKFunctionImpl.(resolvedCommandCall: ResolvedCommandCall) -> Unit) : AbstractCommandSignature, CommandSignatureFromKFunction
Link copied to clipboard
open class CommandSignatureImpl(    val receiverParameter: CommandReceiverParameter<*>?,     val valueParameters: List<AbstractCommandValueParameter<*>>,     onCall: suspend CommandSignatureImpl.(resolvedCommandCall: ResolvedCommandCall) -> Unit) : AbstractCommandSignature, CommandSignature
Link copied to clipboard
interface CommandValueArgumentParser<out T : Any>

指令参数解析器. 用于解析字符串或 SingleMessage 到特定参数类型.

Link copied to clipboard
interface CommandValueParameter<T> : CommandParameter<T>

Inherited instances must be AbstractCommandValueParameter.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object EmptyCommandArgumentContext : CommandArgumentContext
Link copied to clipboard
class EnumValueArgumentParser<T : Enum<T>>(type: Class<T>) : InternalCommandValueArgumentParserExtensions<T>

解析参数为枚举 T

Link copied to clipboard

根据 Bot.id 解析一个登录后的 Bot

Link copied to clipboard

解析任意一个存在的好友.

Link copied to clipboard

解析任意一个存在的群.

Link copied to clipboard

解析任意一个群成员.

Link copied to clipboard

标记一个实验性的指令解释器 API.

Link copied to clipboard
Link copied to clipboard

解析 String 通过 Image.

Link copied to clipboard

使用 String.toInt 解析

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

直接返回原始参数 MessageContent

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class TemporalArgumentParser<T : TemporalAccessor>(    type: Class<T>,     now: () -> T,     parse: (CharSequence) -> T) : InternalCommandValueArgumentParserExtensions<T>

解析参数为时间 T

Link copied to clipboard
interface TypeVariant<out OutType>

Intrinsic variant of an CommandValueArgument.

Functions

Link copied to clipboard
Link copied to clipboard
operator fun CommandArgumentContext.plus(replacer: List<CommandArgumentContext.ParserPair<*>>): CommandArgumentContext

合并 thisreplacer, replacer 将会替换 this 中重复的 parser.

operator fun CommandArgumentContext.plus(replacer: CommandArgumentContext): CommandArgumentContext

合并两个 buildCommandArgumentContext, replacer 将会替换 this 中重复的 parser.