use a cooler event handler for events (async)

This commit is contained in:
Jannik Reimers 2024-11-24 03:24:01 +01:00
parent 0366cbbbd8
commit 1157eb50de
Signed by: jansel
GPG key ID: 39C62D7D5233CFD0
3 changed files with 4 additions and 1 deletions

View file

@ -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) {