mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Fix StringConstant
This commit is contained in:
parent
1ae6b1f13c
commit
43eef23b67
@ -186,7 +186,7 @@ public sealed class AbstractCommandValueParameter<T> : CommandValueParameter<T>,
|
|||||||
override fun toString(): String = "<$expectingValue>"
|
override fun toString(): String = "<$expectingValue>"
|
||||||
|
|
||||||
override fun acceptingImpl(expectingType: KType, argument: CommandValueArgument, commandArgumentContext: CommandArgumentContext?): ArgumentAcceptance {
|
override fun acceptingImpl(expectingType: KType, argument: CommandValueArgument, commandArgumentContext: CommandArgumentContext?): ArgumentAcceptance {
|
||||||
return if (argument.type.isSubtypeOf(expectingType) && argument.value.content == expectingValue) {
|
return if (argument.value.content == expectingValue) {
|
||||||
ArgumentAcceptance.Direct
|
ArgumentAcceptance.Direct
|
||||||
} else ArgumentAcceptance.Impossible
|
} else ArgumentAcceptance.Impossible
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user