mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-11-21 23:23:47 +00:00
commit
1bf59c20d4
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 3.4.1
|
||||||
|
|
||||||
|
* `setupBotPlugin` now works synchronously
|
||||||
|
|
||||||
## 3.4.0
|
## 3.4.0
|
||||||
|
|
||||||
* `Versions`:
|
* `Versions`:
|
||||||
|
@ -63,20 +63,18 @@ data class PlaguBot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
||||||
config.plugins.map { plugin ->
|
config.plugins.forEach { plugin ->
|
||||||
launch {
|
runCatchingSafely {
|
||||||
runCatchingSafely {
|
logger.i("Start loading of $plugin")
|
||||||
logger.i("Start loading of $plugin")
|
with(plugin) {
|
||||||
with(plugin) {
|
setupBotPlugin(koin)
|
||||||
setupBotPlugin(koin)
|
|
||||||
}
|
|
||||||
}.onFailure { e ->
|
|
||||||
logger.w("Unable to load bot part of $plugin", e)
|
|
||||||
}.onSuccess {
|
|
||||||
logger.i("Complete loading of $plugin")
|
|
||||||
}
|
}
|
||||||
|
}.onFailure { e ->
|
||||||
|
logger.w("Unable to load bot part of $plugin", e)
|
||||||
|
}.onSuccess {
|
||||||
|
logger.i("Complete loading of $plugin")
|
||||||
}
|
}
|
||||||
}.joinAll()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
|
|||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=3.4.0
|
version=3.4.1
|
||||||
|
Loading…
Reference in New Issue
Block a user