请问事件被广播后一般如何接收呢?
#1574
-
@Suppress("FunctionName")
@JvmName("broadcast")
@JavaFriendlyAPI
public fun <E : Event> E.__broadcastJava(): E = apply {
if (this is BroadcastControllable && !this.shouldBroadcast) {
return@apply
}
runBlocking { this@__broadcastJava.broadcast() }
} 我应该如何接收被广播的event? |
Beta Was this translation helpful? Give feedback.
Answered by
Karlatemp
Oct 7, 2021
Replies: 1 comment 1 reply
-
Sorry for late reply: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Orisland
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for late reply:
https://github.com/mamoe/mirai/blob/dev/docs/Events.md#%E5%9C%A8-eventchannel-%E7%9B%91%E5%90%AC%E4%BA%8B%E4%BB%B6