Message chains (FSM)
The most valuable thing in the library is the convenient construction of a dialog with the user (let name it the "chain").
Most dialogs with bot begin with the command. You can also start a chain with a callback, etc.
com/example/myproject/handler/StartHandler.kt
@HandlerComponent
class StartHandler : BotHandler({
command("/start") {
// here are the actions when the user enters the /start command
}
})
com/example/myproject/handler/StartHandler.kt
@Factory
class StartHandler : BotHandler({
command("/start") {
// here are the actions when the user enters the /start command
}
})
com/example/myproject/handler/StartHandler.kt
fun BotHandling.startHandler() {
command("/start") {
// here are the actions when the user enters the /start command
}
}
Last modified: 27 July 2024