Closed mort3za closed 8 years ago
@mort3za I'm also having the same problem, did you find any fix?
@danieltorrer Not yet :(
@danieltorrer Found solution. Inside validator:
if (input['text'] && input['text'] == '/stop') {
$.sendMessage("Operation stopped. You can /start again.")
return // return without running callback
}
if (input['text'] && input['text'].length >= 6) {
callback(true)
return
}
callback(false)
And just added /stop
to list of commands in BotFather.
@mort3za Awesome, I was thinking in some kind of middleware before every route but I couldn't dig into the code
Assume we have a form that has a special field with a validation that user don't understands how to fill it and wants to go back and see the tutorial. How we can listen for
/stop
in middle of questioning form fields?