mirai-core / net.mamoe.mirai.message.data / AtAll / followedBy

followedBy

fun followedBy(tail: Message): MessageChain

thistail 连接.

连接后可以保证 ConstrainSingle 的元素单独存在.

例:

val a = PlainText("Hello ")
val b = PlainText("world!")
val c: MessageChain = a + b
println(c) // "Hello world!"

val d = PlainText("world!")
val e = c + d; // PlainText + CombinedMessage
println(c) // "Hello world!"

See Also

plus