diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/HelloPlugin.kt b/bot/src/main/kotlin/dev/inmo/plagubot/HelloPlugin.kt index 67926e2..2f5a481 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/HelloPlugin.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/HelloPlugin.kt @@ -31,11 +31,12 @@ object HelloPlugin : Plugin { } } - override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) { - logger.d { koin.get().print } + override suspend fun BehaviourContextWithFSM.setupBotPlugin(koin: Koin) { + val toPrint = koin.getOrNull() ?.print ?: "Hello :)" + logger.d { toPrint } logger.dS { getMe().toString() } onCommand("hello_world") { - reply(it, "Hello :)") + reply(it, toPrint) } } }