mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Fix: CommandSender 类型不满足要求时应提示 "需要由xxx执行" 而不是 "参数类型错误" (#309)
This commit is contained in:
parent
ee1561f97d
commit
da32c90eed
@ -150,8 +150,8 @@ internal fun UnmatchedCommandSignature.render(command: Command): String {
|
|||||||
@OptIn(ExperimentalCommandDescriptors::class)
|
@OptIn(ExperimentalCommandDescriptors::class)
|
||||||
internal fun FailureReason.render(): String {
|
internal fun FailureReason.render(): String {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is FailureReason.InapplicableArgument -> "参数类型错误"
|
|
||||||
is FailureReason.InapplicableReceiverArgument -> "需要由 ${this.parameter.renderAsName()} 执行"
|
is FailureReason.InapplicableReceiverArgument -> "需要由 ${this.parameter.renderAsName()} 执行"
|
||||||
|
is FailureReason.InapplicableArgument -> "参数类型错误"
|
||||||
is FailureReason.TooManyArguments -> "参数过多"
|
is FailureReason.TooManyArguments -> "参数过多"
|
||||||
is FailureReason.NotEnoughArguments -> "参数不足"
|
is FailureReason.NotEnoughArguments -> "参数不足"
|
||||||
is FailureReason.ResolutionAmbiguity -> "调用歧义"
|
is FailureReason.ResolutionAmbiguity -> "调用歧义"
|
||||||
|
Loading…
Reference in New Issue
Block a user