소스 검색

Add `MessageChainBuilder.build`

Him188 6 년 전
부모
커밋
6f5441bf1a
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/builder.kt

+ 3 - 0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/builder.kt

@@ -161,4 +161,7 @@ class MessageChainBuilder private constructor(
         this.flushCache()
         return MessageChainImplByCollection(this) // fast-path, no need to constrain
     }
+
+    /** 同 [asMessageChain] */
+    fun build(): MessageChain = asMessageChain()
 }