We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
直接从 GlobalEventChannel 得到的监听器不受 插件生命周期管理
GlobalEventChannel
maimai-bot/src/main/kotlin/MaimaiBot.kt
Line 94 in 0ca5fb3
你应该使用 CoroutineScope.globalEventChannel() 这个扩展方法, KotlinPlugin/JvmPlugin 就是 CoroutineScope 的子类实现
CoroutineScope.globalEventChannel()
KotlinPlugin/JvmPlugin
CoroutineScope
所以你可以 直接使用 var channel: EventChannel<Event> = globalEventChannel() 替换原本的代码
var channel: EventChannel<Event> = globalEventChannel()
The text was updated successfully, but these errors were encountered:
👌
Sorry, something went wrong.
9513966
No branches or pull requests
直接从
GlobalEventChannel
得到的监听器不受 插件生命周期管理maimai-bot/src/main/kotlin/MaimaiBot.kt
Line 94 in 0ca5fb3
你应该使用
CoroutineScope.globalEventChannel()
这个扩展方法,KotlinPlugin/JvmPlugin
就是CoroutineScope
的子类实现所以你可以 直接使用
var channel: EventChannel<Event> = globalEventChannel()
替换原本的代码The text was updated successfully, but these errors were encountered: