From 47f5086ebd5da695a3f175fd3564be98e91b638a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 22 Sep 2024 13:32:59 +0600 Subject: [PATCH] Plugin#setupBotPlugin will call startPlugin by default --- CHANGELOG.md | 3 +++ plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cfa9d2..9631420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 9.3.1 +* `Plugin`: + * `Plugin#setupBotPlugin` now will call start plugin by default + ## 9.3.0 * `Bot`: diff --git a/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt b/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt index 621e151..0797d8f 100644 --- a/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt +++ b/plugin/src/main/kotlin/dev/inmo/plagubot/Plugin.kt @@ -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