koin not started bug fix

This commit is contained in:
dalbodeule 2024-08-04 18:59:40 +09:00
parent 4025cbceec
commit 514ab14c3c
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
2 changed files with 6 additions and 9 deletions

View File

@ -1,8 +1,6 @@
package space.mori.chzzk_bot.chatbot.chzzk
import io.github.cdimascio.dotenv.dotenv
import jdk.internal.net.http.common.Pair
import jdk.internal.net.http.common.Pair.pair
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@ -11,7 +9,6 @@ import org.slf4j.LoggerFactory
import space.mori.chzzk_bot.common.events.CoroutinesEventBus
import space.mori.chzzk_bot.common.events.GetUserEvents
import space.mori.chzzk_bot.common.events.GetUserType
import space.mori.chzzk_bot.common.models.User
import space.mori.chzzk_bot.common.services.LiveStatusService
import space.mori.chzzk_bot.common.services.UserService
import xyz.r2turntrue.chzzk4j.Chzzk

View File

@ -22,12 +22,6 @@ val dotenv = dotenv {
}
val logger: Logger = LoggerFactory.getLogger("main")
val discord = Discord()
val connector = Connector
val chzzkConnector = ChzzkConnector
val chzzkHandler = ChzzkHandler
fun main(args: Array<String>) {
val dispatcher = module {
single { CoroutinesEventBus() }
@ -36,6 +30,12 @@ fun main(args: Array<String>) {
modules(dispatcher)
}
val discord = Discord()
val connector = Connector
val chzzkConnector = ChzzkConnector
val chzzkHandler = ChzzkHandler
discord.enable()
chzzkHandler.enable()
chzzkHandler.runStreamInfo()