mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-12-02 12:20:05 +00:00
Compare commits
No commits in common. "db06bc42777fd8fe6e08d65f2bbae9cf5f327686" and "18de209fac13598313136fa5ede56365bc242a25" have entirely different histories.
db06bc4277
...
18de209fac
@ -1,13 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 1.1.0
|
|
||||||
|
|
||||||
* `Versions`
|
|
||||||
* `tgbotapi`: `2.0.0`
|
|
||||||
* `microutils`: `0.10.5`
|
|
||||||
* `Plugin`:
|
|
||||||
* All plugins will be loaded in parallel
|
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
* `Versions`
|
* `Versions`
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package dev.inmo.plagubot
|
package dev.inmo.plagubot
|
||||||
|
|
||||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
|
||||||
import dev.inmo.plagubot.config.*
|
import dev.inmo.plagubot.config.*
|
||||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||||
import dev.inmo.tgbotapi.extensions.api.webhook.deleteWebhook
|
import dev.inmo.tgbotapi.extensions.api.webhook.deleteWebhook
|
||||||
@ -57,20 +56,15 @@ data class PlaguBot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
|
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
|
||||||
config.plugins.map {
|
config.plugins.forEach {
|
||||||
launch {
|
runCatching {
|
||||||
runCatchingSafely {
|
with(it) {
|
||||||
logger.info("Start loading of $it")
|
setupBotPlugin(koin)
|
||||||
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")
|
|
||||||
}
|
}
|
||||||
|
}.onFailure { e ->
|
||||||
|
logger.log(Level.WARNING, "Unable to load bot part of $it", e)
|
||||||
}
|
}
|
||||||
}.joinAll()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,4 +5,4 @@ kotlin.js.generate.externals=true
|
|||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=1.1.0
|
version=1.0.0
|
||||||
|
@ -4,8 +4,8 @@ kt = "1.6.21"
|
|||||||
kt-serialization = "1.3.3"
|
kt-serialization = "1.3.3"
|
||||||
kt-coroutines = "1.6.1"
|
kt-coroutines = "1.6.1"
|
||||||
|
|
||||||
microutils = "0.10.5"
|
microutils = "0.10.4"
|
||||||
tgbotapi = "2.0.0"
|
tgbotapi = "1.1.0"
|
||||||
|
|
||||||
jb-exposed = "0.38.2"
|
jb-exposed = "0.38.2"
|
||||||
jb-dokka = "1.6.21"
|
jb-dokka = "1.6.21"
|
||||||
|
Loading…
Reference in New Issue
Block a user