Skip to content

Commit

Permalink
Plugin#setupBotPlugin will call startPlugin by default
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanusMokrassar committed Sep 22, 2024
1 parent bc29d4f commit 47f5086
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 9.3.1

* `Plugin`:
* `Plugin#setupBotPlugin` now will call start plugin by default

## 9.3.0

* `Bot`:
Expand Down
4 changes: 3 additions & 1 deletion plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ interface Plugin : 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
Expand Down

0 comments on commit 47f5086

Please sign in to comment.