Closed Kotov584 closed 10 months ago
or also this
package com.example.blank.conversation
import eu.vendeli.tgbot.TelegramBot
import eu.vendeli.tgbot.api.message
import eu.vendeli.tgbot.types.User
class GreetingsConversation {
fun start(user: User, bot: TelegramBot) {
message("Hello, let's move to second step!").send(user, bot)
}
fun secondStep(user: User, bot: TelegramBot) {
message("Nice job! You completed this.").send(user, bot)
}
}
Experimental implementation is released in #61
implemented in #75
Is your feature request related to a problem? Please describe. I'm always frustrated when I have to define conversations using input handlers. When you are using input handlers, it's pretty hard to write and manage complex conversations.
Describe the solution you'd like Instead of input handlers, we could use classes for defining conversations. So we are able to write more well-architected code, even when it is complex.
Example:
Additional context Not sure, if we can do this way. We discussed about it in Telegram group.