Wait for answer

What it is "Wait for answer"?

It is need the Wait for answer flag if need a response from the user.
Can be modified on command editing
Example of execution of one command:
Bot:
What is your name?
User:
Jon
Bot:
Hello, Jon
command:
1
answer: What is your name?
2
need_reply: true
3
BJS: Bot.sendMessage( "Hello, " + message );
Copied!
So BJS code execute only after user's answer

How to cancel "Wait for"?

Example of canceled for command with "Wait for":
Bot:
What is your name?
User (press "❌ Back" on keybord):
❌ Back
BJS:
1
if(message=="❌ Back"){
2
return // exit from command on "Back"
3
}
4
5
Bot.sendMessage( "Hello, " + message );
Copied!
or you can run /menu command on "Back"
1
if(message=="❌ Back"){
2
Bot.runCommand("/menu")
3
return // exit from command on "Back"
4
}
5
6
Bot.sendMessage( "Hello, " + message );
Copied!