Open MorganaUzhgorod opened 5 years ago
just remove the curly braces {}
on your last bot response,
bot.on('/test', msg => {
const id = msg.from.id;
return bot.sendMessage(id, 'test run, now reply me anything.', {ask: 'waiting'});
});
bot.on('ask.waiting', msg => {
const id = msg.from.id;
const txt = msg.text;
return bot.sendMessage(id, `Your reply is ${txt}`);
});
ask Plugin just send message at the same time with parent command. I use it with namedButtons plugin. (usePlugins: ['namedButtons', 'askUser'])
See screenshots