mirror of
https://github.com/InsanusMokrassar/PlaguBot.git
synced 2024-11-22 07:33:46 +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) {
|
override suspend fun BehaviourContextWithFSM<State>.setupBotPlugin(koin: Koin) {
|
||||||
logger.d { koin.get<HelloPluginConfig>().print }
|
val toPrint = koin.getOrNull<HelloPluginConfig>() ?.print ?: "Hello :)"
|
||||||
|
logger.d { toPrint }
|
||||||
logger.dS { getMe().toString() }
|
logger.dS { getMe().toString() }
|
||||||
onCommand("hello_world") {
|
onCommand("hello_world") {
|
||||||
reply(it, "Hello :)")
|
reply(it, toPrint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user