You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bot.on('/start', msg => {
const id = msg.from.id;
// Ask user name
return bot.sendMessage(id, 'What is your name?', {ask: 'name'});
});
// Ask name event
bot.on('ask.name', msg => {
const id = msg.from.id;
const name = msg.text;
// Ask user age
return bot.sendMessage(id, Nice to meet you, ${ name }! How old are you?, {ask: 'age'});
});
if send /cancel or another command, how to stop/interupt askUser ?
to hide/stop this message "Nice to meet you, /cancel ! How old are you?"
The text was updated successfully, but these errors were encountered:
bot.on('/start', msg => {
const id = msg.from.id;
// Ask user name
return bot.sendMessage(id, 'What is your name?', {ask: 'name'});
});
// Ask name event
bot.on('ask.name', msg => {
const id = msg.from.id;
const name = msg.text;
// Ask user age
return bot.sendMessage(id,
Nice to meet you, ${ name }! How old are you?
, {ask: 'age'});});
if send /cancel or another command, how to stop/interupt askUser ?
to hide/stop this message "Nice to meet you, /cancel ! How old are you?"
The text was updated successfully, but these errors were encountered: