Compare commits

..

8 Commits

Author SHA1 Message Date
d6770e1c02 remove redundant config test and update build workflow 2022-05-16 14:12:56 -04:00
8aaaa86dd4 add logging inside of plagubot 2022-05-16 14:08:45 -04:00
6b2b0b07f5 fill changelog 2022-05-16 14:03:27 -04:00
bb1856de90 complete 1.0.0 2022-05-16 13:58:16 -04:00
41885b8f7b temporal progress 2022-05-16 20:07:57 +06:00
a0f9e31b04 start migration 2022-05-13 13:04:49 +06:00
a7937f297d start 1.0.0 2022-05-13 12:34:39 +06:00
e0ebbfa7ec Merge pull request #25 from InsanusMokrassar/0.5.1
0.5.1
2022-02-02 13:39:32 +06:00
4 changed files with 10 additions and 24 deletions

View File

@@ -1,13 +1,5 @@
# Changelog
## 1.1.0
* `Versions`
* `tgbotapi`: `2.0.0`
* `microutils`: `0.10.5`
* `Plugin`:
* All plugins will be loaded in parallel
## 1.0.0
* `Versions`

View File

@@ -1,6 +1,5 @@
package dev.inmo.plagubot
import dev.inmo.micro_utils.coroutines.runCatchingSafely
import dev.inmo.plagubot.config.*
import dev.inmo.tgbotapi.bot.ktor.telegramBot
import dev.inmo.tgbotapi.extensions.api.webhook.deleteWebhook
@@ -57,20 +56,15 @@ data class PlaguBot(
}
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
config.plugins.map {
launch {
runCatchingSafely {
logger.info("Start loading of $it")
with(it) {
setupBotPlugin(koin)
}
}.onFailure { e ->
logger.log(Level.WARNING, "Unable to load bot part of $it", e)
}.onSuccess {
logger.info("Complete loading of $it")
config.plugins.forEach {
runCatching {
with(it) {
setupBotPlugin(koin)
}
}.onFailure { e ->
logger.log(Level.WARNING, "Unable to load bot part of $it", e)
}
}.joinAll()
}
}
/**

View File

@@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
kotlin.incremental=true
group=dev.inmo
version=1.1.0
version=1.0.0

View File

@@ -4,8 +4,8 @@ kt = "1.6.21"
kt-serialization = "1.3.3"
kt-coroutines = "1.6.1"
microutils = "0.10.5"
tgbotapi = "2.0.0"
microutils = "0.10.4"
tgbotapi = "1.1.0"
jb-exposed = "0.38.2"
jb-dokka = "1.6.21"