Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to reset a state? #5

Closed
lsndr opened this issue Sep 25, 2016 · 1 comment
Closed

How to reset a state? #5

lsndr opened this issue Sep 25, 2016 · 1 comment

Comments

@lsndr
Copy link

lsndr commented Sep 25, 2016

How to reset current state after first answer on command?

For example user need to add his name once:

(how it has to be)
U: /name
B: Write your name
U: John
B: Thanks, John.
U: Mike
....nothing happens

(how it is)
U: /name
B: Write your name
U: John
B: Thanks, John.
U: Mike
B: Thanks, Mike.
U: Pavel
B: Thanks, Mike.
..

These methods doesn't help:
context.go()
context.goParent()
context.goBack()
context.repeat()
context.end()

@SerjoPepper
Copy link
Owner

Hi, it works this way because the text interpreted as an answer. If you want to finish this command and go to other command, use context.go:

context.go('start')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants