From f7379d8b08c8b5996d886fda46f7dd7033d155ca Mon Sep 17 00:00:00 2001 From: Him188 <Him188@mamoe.net> Date: Fri, 31 Jan 2020 20:45:42 +0800 Subject: [PATCH] Fix typo --- .../kotlin/net.mamoe.mirai/event/MessageSubscribers.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt index ba13cd103..8d9235924 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/MessageSubscribers.kt @@ -518,7 +518,7 @@ class MessageSubscribersBuilder<T : MessagePacket<*, *>>( * [replier] 的 `it` 将会是去掉用来判断的后缀并删除前后空格后的字符串. * 如当消息为 " 123456 test" 时 * ```kotlin - * "test" endswithReply { + * "test" endsWithReply { * println(it) // it 为 "123456" * } * ``` @@ -526,7 +526,7 @@ class MessageSubscribersBuilder<T : MessagePacket<*, *>>( * @param replier 若返回 [Message] 则直接发送; 若返回 [Unit] 则不回复; 其他情况则 [Any.toString] 后回复 */ @MessageDsl - inline infix fun String.endswithReply(crossinline replier: @MessageDsl suspend T.(String) -> Any?): Listener<T> { + inline infix fun String.endsWithReply(crossinline replier: @MessageDsl suspend T.(String) -> Any?): Listener<T> { val toCheck = this.trimEnd() return content({ it.trim().endsWith(toCheck) }, { @Suppress("DSL_SCOPE_VIOLATION_WARNING")