mirai-core / net.mamoe.mirai.message.data / kotlin.collections.Iterable / flatten

flatten

fun Iterable<Message>.flatten(): Sequence<SingleMessage>

扁平化消息序列.

this:

A <- CombinedMessage(B, C) <- D <- MessageChain(E, F, G)

结果 Sequence:

A <- B <- C <- D <- E <- F <- G
@JvmName("flatten1") fun Iterable<SingleMessage>.flatten(): Sequence<SingleMessage>