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

Extensions for kotlin.collections.Iterable

asMessageChain

直接将 this 委托为一个 MessageChain

fun Iterable<SingleMessage>.asMessageChain(): MessageChain

thisflatten 委托为一个 MessageChain

fun Iterable<Message>.asMessageChain(): MessageChain

flatten

扁平化消息序列.

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

toForwardMessage

转换为 ForwardMessage

fun Iterable<ContactMessage>.toForwardMessage(displayStrategy: DisplayStrategy = DisplayStrategy): ForwardMessage