Преглед на файлове

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()
 }