Compare commits

...

4 Commits
9.3.0 ... 9.3.1

3 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,10 @@
# Changelog
## 9.3.1
* `Plugin`:
* `Plugin#setupBotPlugin` now will call start plugin by default
## 9.3.0
* `Bot`:

View File

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

View File

@@ -45,10 +45,14 @@ interface Plugin : StartPlugin {
/**
* Override this method in cases when you want to declare common bot behaviour. In case you wish to use FSM, you
* should override the method with receiver [BehaviourContextWithFSM]
*
* Besides, this method by default will call [startPlugin]
*/
suspend fun BehaviourContext.setupBotPlugin(
koin: Koin
) {}
) {
startPlugin(koin)
}
/**
* Override this method in cases when you want to declare full behaviour of the plugin. It is recommended to declare
* common logic of plugin in the [setupBotPlugin] with [BehaviourContext] receiver and use override this one