mirai-core / net.mamoe.mirai.event / kotlinx.coroutines.CoroutineScope / subscribeMessages

subscribeMessages

fun <R> CoroutineScope.subscribeMessages(coroutineContext: CoroutineContext = EmptyCoroutineContext, concurrencyKind: ConcurrencyKind = Listener.ConcurrencyKind.CONCURRENT, listeners: MessagePacketSubscribersBuilder.() -> R): R

订阅来自所有 Bot 的所有联系人的消息事件. 联系人可以是任意群或任意好友或临时会话.

See Also

CoroutineScope.incoming