mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-11-21 23:23:47 +00:00
a little upgrade of hello plugin
This commit is contained in:
parent
caa028b799
commit
6c2cfbf06f
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user