get back koin dependency

This commit is contained in:
InsanusMokrassar 2023-10-01 15:55:33 +06:00
parent 30cf190461
commit fbe166f2b4
2 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ dependencies {
api libs.tgbotapi
api libs.tgbotapi.behaviourBuilder.fsm
api libs.microutils.repos.exposed
api libs.microutils.koin
api libs.kslog
api libs.sqlite

View File

@ -95,8 +95,8 @@ data class PlaguBot(
GlobalContext.startKoin(koinApp)
logger.i("Koin started")
lateinit var behaviourContext: BehaviourContext
val onStartContextsConflictResolver = koinApp.koin.getAllDistinct<OnStartContextsConflictResolver>()
val onUpdateContextsConflictResolver = koinApp.koin.getAllDistinct<OnUpdateContextsConflictResolver>()
val onStartContextsConflictResolver by lazy { koinApp.koin.getAllDistinct<OnStartContextsConflictResolver>() }
val onUpdateContextsConflictResolver by lazy { koinApp.koin.getAllDistinct<OnUpdateContextsConflictResolver>() }
bot.buildBehaviourWithFSM(
scope = scope,
defaultExceptionsHandler = {