diff --git a/CHANGELOG.md b/CHANGELOG.md index 5babf55..4156d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.4.1 + +* `setupBotPlugin` now works synchronously + ## 3.4.0 * `Versions`: diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt index 5cec546..4b0cf7c 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt @@ -63,20 +63,18 @@ data class PlaguBot( } override suspend fun BehaviourContextWithFSM.setupBotPlugin(koin: Koin) { - config.plugins.map { plugin -> - launch { - runCatchingSafely { - logger.i("Start loading of $plugin") - with(plugin) { - setupBotPlugin(koin) - } - }.onFailure { e -> - logger.w("Unable to load bot part of $plugin", e) - }.onSuccess { - logger.i("Complete loading of $plugin") + config.plugins.forEach { plugin -> + runCatchingSafely { + logger.i("Start loading of $plugin") + with(plugin) { + setupBotPlugin(koin) } + }.onFailure { e -> + logger.w("Unable to load bot part of $plugin", e) + }.onSuccess { + logger.i("Complete loading of $plugin") } - }.joinAll() + } } /** diff --git a/gradle.properties b/gradle.properties index 3c095e4..fe1f9aa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ kotlin.js.generate.externals=true kotlin.incremental=true group=dev.inmo -version=3.4.0 +version=3.4.1