event Flow
AcidifyEvent 流,可用于监听各种事件
示例:
bot.eventFlow.collect { event ->
when (event) {
is QRCodeGeneratedEvent -> {
println("QR Code URL: ${event.url}")
}
}
}Content copied to clipboard
注意 collect 是一个 suspend 函数,强烈建议在与 Bot 实例相同的 CoroutineScope 中使用。