Add Message.plus(Array<out Message>

This commit is contained in:
Him188 2021-01-06 15:00:05 +08:00
parent dc449bdca9
commit 58c2a2edb8

View File

@ -184,6 +184,10 @@ public interface Message { // must be interface. Don't consider any changes.
public operator fun plus(another: Iterable<Message>): MessageChain =
another.fold(this, Message::plus).asMessageChain()
/** 将 [another] 按顺序连接到这个消息的尾部. */
public operator fun plus(another: Array<out Message>): MessageChain =
another.fold(this, Message::plus).asMessageChain()
/** 将 [another] 按顺序连接到这个消息的尾部. */
@JvmName("plusIterableString")
public operator fun plus(another: Iterable<String>): MessageChain =