mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-12-02 04:10:06 +00:00
Compare commits
5 Commits
18de209fac
...
db06bc4277
Author | SHA1 | Date | |
---|---|---|---|
db06bc4277 | |||
1cd9e6132c | |||
394ac02389 | |||
e2294965ff | |||
3912ce2ba4 |
@ -1,5 +1,13 @@
|
||||
# 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`
|
||||
|
@ -1,5 +1,6 @@
|
||||
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
|
||||
@ -56,15 +57,20 @@ data class PlaguBot(
|
||||
}
|
||||
|
||||
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
|
||||
config.plugins.forEach {
|
||||
runCatching {
|
||||
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")
|
||||
}
|
||||
}
|
||||
}.joinAll()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
|
||||
group=dev.inmo
|
||||
version=1.0.0
|
||||
version=1.1.0
|
||||
|
@ -4,8 +4,8 @@ kt = "1.6.21"
|
||||
kt-serialization = "1.3.3"
|
||||
kt-coroutines = "1.6.1"
|
||||
|
||||
microutils = "0.10.4"
|
||||
tgbotapi = "1.1.0"
|
||||
microutils = "0.10.5"
|
||||
tgbotapi = "2.0.0"
|
||||
|
||||
jb-exposed = "0.38.2"
|
||||
jb-dokka = "1.6.21"
|
||||
|
Loading…
Reference in New Issue
Block a user