Fix: CommandSender 类型不满足要求时应提示 "需要由xxx执行" 而不是 "参数类型错误" (#309)

This commit is contained in:
ZRnQ 2021-03-11 22:48:09 +08:00 committed by Karlatemp
parent ee1561f97d
commit da32c90eed
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -150,8 +150,8 @@ internal fun UnmatchedCommandSignature.render(command: Command): String {
@OptIn(ExperimentalCommandDescriptors::class)
internal fun FailureReason.render(): String {
return when (this) {
is FailureReason.InapplicableArgument -> "参数类型错误"
is FailureReason.InapplicableReceiverArgument -> "需要由 ${this.parameter.renderAsName()} 执行"
is FailureReason.InapplicableArgument -> "参数类型错误"
is FailureReason.TooManyArguments -> "参数过多"
is FailureReason.NotEnoughArguments -> "参数不足"
is FailureReason.ResolutionAmbiguity -> "调用歧义"