Compare commits

...

22 Commits

Author SHA1 Message Date
b30aee0109 update dependencies 2025-04-30 13:26:31 +06:00
be45f94070 start 10.5.0 2025-03-27 08:31:24 +06:00
485d0d1fbf Merge pull request #113 from InsanusMokrassar/10.4.0
10.4.0
2025-02-16 09:22:03 +06:00
69e97223ce update dependencies 2025-02-16 09:21:30 +06:00
f067033678 start 10.4.0 2025-02-16 09:19:24 +06:00
37920521a0 Merge pull request #112 from InsanusMokrassar/10.3.1
10.3.1
2025-01-29 14:29:07 +06:00
d78f8adbea Update CHANGELOG.md 2025-01-29 14:28:55 +06:00
487ce413f1 update dependencies 2025-01-29 12:04:12 +06:00
556ded1e84 start 10.3.1 2025-01-29 12:02:34 +06:00
605fb956a4 Merge pull request #111 from InsanusMokrassar/10.3.0
10.3.0
2024-12-08 15:00:54 +06:00
b907f8d53b update dependencies 2024-12-07 10:10:17 +06:00
2a0cd5d6a8 start 10.3.0 2024-12-07 10:09:23 +06:00
00f3485959 Merge pull request #110 from InsanusMokrassar/10.2.1
10.2.1
2024-12-03 11:30:48 +06:00
856ae65fa8 add support of subcontext initial actions 2024-12-03 11:28:07 +06:00
d9488f8ccd start 10.2.1 2024-12-03 09:18:07 +06:00
2f06a65cc6 Merge pull request #109 from InsanusMokrassar/10.2.0
10.2.0
2024-12-01 12:00:01 +06:00
f3e6b55861 update dependencies 2024-12-01 11:59:02 +06:00
7bdb525f01 start 10.2.0 2024-12-01 11:57:22 +06:00
e6a2add7f8 Merge pull request #108 from InsanusMokrassar/10.1.1
10.1.1
2024-11-11 16:05:46 +06:00
3d7cb28c92 update tgbotapi 2024-11-11 16:02:10 +06:00
81a1ed6613 start 10.1.1 2024-11-11 15:59:14 +06:00
b43efb4255 Merge pull request #107 from InsanusMokrassar/10.1.0
10.1.0
2024-11-04 22:11:56 +06:00
6 changed files with 90 additions and 13 deletions

View File

@@ -1,5 +1,65 @@
# Changelog
## 10.5.0
* `Versions`:
* `kotlin`: `2.1.20`
* `serialization`: `1.8.1`
* `coroutines`: `1.10.2`
* `microutils`: `0.25.5`
* `tgbotapi`: `24.0.2`
* `exposed`: `0.61.0`
* `sqlite`: `3.49.1.0`
* `koin`: `4.0.4`
## 10.4.0
* `Versions`:
* `microutils`: `0.24.6`
* `tgbotapi`: `23.2.0`
* `exposed`: `0.59.0`
* `sqlite`: `3.49.0.0`
## 10.3.1
* `Versions`:
* `kotlin`: `2.1.10`
* `serialization`: `1.8.0`
* `coroutines`: `1.10.1`
* `microutils`: `0.24.5`
* `tgbotapi`: `23.1.2`
* `exposed`: `0.58.0`
* `sqlite`: `3.48.0.0`
* `koin`: `4.0.2`
## 10.3.0
* `Versions`:
* `microutils`: `0.23.2`
* `tgbotapi`: `22.0.0`
* `exposed`: `0.57.0`
## 10.2.1
* `Versions`:
* `tgbotapi`: `21.0.1`
* `Bot`:
* Now all `CombinedSubcontextInitialAction.SubItem`s will be taken from `Koin` to setup root `subcontextInitialAction`
## 10.2.0
* `Versions`:
* `kotlin`: `2.1.0`
* `microutils`: `0.23.1`
* `tgbotapi`: `21.0.0`
* `exposed`: `0.56.0`
* `sqlite`: `3.47.1.0`
## 10.1.1
* `Versions`:
* `tgbotapi`: `20.0.1`
## 10.1.0
* `Versions`:

View File

@@ -19,6 +19,8 @@ That is a set of libraries for plagubots. Look at the
### Technical help
#### FSM
In this bot has been used variant with FSM. That means that you may use all the [Behaviour Builder with FSM](https://bookstack.inmo.dev/books/telegrambotapi/page/behaviour-builder-with-fsm) functionality. In case you wish to setup states repo, you should use the next code in the `setupDI` of your plugin:
```kotlin
@@ -41,3 +43,16 @@ single<StateHandlingErrorHandler<State>> {
}
}
```
#### Subcontext initial actions
Bot will take all the `CombinedSubcontextInitialAction.SubItem`s from `Koin` to include it in root of
`behaviourBuilder`. To create your own subitem:
```kotlin
singleWithRandomQualifier<CombinedSubcontextInitialAction.SubItem> {
CombinedSubcontextInitialAction.SubItem {
// do some action or throw error to rerun on next round
}
}
```

View File

@@ -7,6 +7,7 @@ import dev.inmo.micro_utils.fsm.common.State
import dev.inmo.micro_utils.fsm.common.StatesManager
import dev.inmo.micro_utils.fsm.common.managers.*
import dev.inmo.micro_utils.koin.getAllDistinct
import dev.inmo.micro_utils.pagination.utils.getAll
import dev.inmo.micro_utils.startup.launcher.StartLauncherPlugin
import dev.inmo.plagubot.config.*
import dev.inmo.tgbotapi.bot.TelegramBot
@@ -85,7 +86,8 @@ object PlaguBot : Plugin {
onStateHandlingErrorHandler = koin.getOrNull<StateHandlingErrorHandler<State>>() ?: { state, e ->
logger.eS(e) { "Unable to handle state $state" }
null
}
},
subcontextInitialAction = CombinedSubcontextInitialAction(koin.getAllDistinct()).subcontextInitialAction
) {
logger.i("Start setup of bot part")
behaviourContext = this

View File

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

View File

@@ -1,22 +1,22 @@
[versions]
kt = "2.0.21"
kt-serialization = "1.7.3"
kt-coroutines = "1.9.0"
kt = "2.1.20"
kt-serialization = "1.8.1"
kt-coroutines = "1.10.2"
microutils = "0.23.0"
tgbotapi = "20.0.0"
microutils = "0.25.5"
tgbotapi = "24.0.2"
ksp = "2.0.21-1.0.26"
ksp = "2.1.20-1.0.31"
jb-exposed = "0.55.0"
jb-dokka = "1.9.20"
jb-exposed = "0.61.0"
jb-dokka = "2.0.0"
sqlite = "3.47.0.0"
sqlite = "3.49.1.0"
gh-release = "2.5.2"
koin = "4.0.0"
koin = "4.0.4"
[libraries]

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists