a little upgrade of hello plugin

This commit is contained in:
InsanusMokrassar 2022-08-18 12:27:11 +06:00
parent caa028b799
commit 6c2cfbf06f

View File

@ -31,11 +31,12 @@ object HelloPlugin : Plugin {
}
}
override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) {
logger.d { koin.get<HelloPluginConfig>().print }
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
val toPrint = koin.getOrNull<HelloPluginConfig>() ?.print ?: "Hello :)"
logger.d { toPrint }
logger.dS { getMe().toString() }
onCommand("hello_world") {
reply(it, "Hello :)")
reply(it, toPrint)
}
}
}