use a cooler event handler for events (async)
This commit is contained in:
parent
0366cbbbd8
commit
1157eb50de
@ -20,6 +20,7 @@ dependencies {
|
||||
implementation(libs.kx.ser)
|
||||
implementation(libs.kx.coroutines)
|
||||
implementation(libs.twitch4j)
|
||||
implementation(libs.events4j)
|
||||
implementation(libs.kmongo)
|
||||
|
||||
// Logging dependencies
|
||||
|
@ -22,5 +22,5 @@ logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
|
||||
logback-groovy = { module = "io.github.virtualdogbert:logback-groovy-config", version.ref = "logback-groovy" }
|
||||
logging = { module = "io.github.oshai:kotlin-logging", version.ref = "logging" }
|
||||
twitch4j = { module = "com.github.twitch4j:twitch4j", version.ref = "twitch4j" }
|
||||
events4j = { module = "com.github.philippheuer.events4j:events4j-handler-simple", version.ref = "events4j" }
|
||||
events4j = { module = "com.github.philippheuer.events4j:events4j-handler-reactor", version.ref = "events4j" }
|
||||
kmongo = { module="org.litote.kmongo:kmongo-coroutine-serialization", version.ref = "kmongo"}
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
package dev.jansel.feixiao
|
||||
|
||||
import com.github.philippheuer.events4j.reactor.ReactorEventHandler
|
||||
import com.github.twitch4j.TwitchClient
|
||||
import com.github.twitch4j.TwitchClientBuilder
|
||||
import com.github.twitch4j.events.ChannelGoLiveEvent
|
||||
@ -31,6 +32,7 @@ suspend fun main() {
|
||||
.withEnableHelix(true)
|
||||
.withClientId(twitchcid)
|
||||
.withClientSecret(twitchcs)
|
||||
.withDefaultEventHandler(ReactorEventHandler::class.java)
|
||||
.build()
|
||||
|
||||
twitchClient!!.eventManager.onEvent(ChannelGoLiveEvent::class.java) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user