Plugin#setupBotPlugin will call startPlugin by default

This commit is contained in:
InsanusMokrassar 2024-09-22 13:32:59 +06:00
parent bc29d4f83a
commit 47f5086ebd
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,9 @@
## 9.3.1 ## 9.3.1
* `Plugin`:
* `Plugin#setupBotPlugin` now will call start plugin by default
## 9.3.0 ## 9.3.0
* `Bot`: * `Bot`:

View File

@ -48,7 +48,9 @@ interface Plugin : StartPlugin {
*/ */
suspend fun BehaviourContext.setupBotPlugin( suspend fun BehaviourContext.setupBotPlugin(
koin: Koin koin: Koin
) {} ) {
startPlugin(koin)
}
/** /**
* Override this method in cases when you want to declare full behaviour of the plugin. It is recommended to declare * 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 * common logic of plugin in the [setupBotPlugin] with [BehaviourContext] receiver and use override this one