Open pimumu opened 2 years ago
@pimumu Issue fixed and code change already committed. Please close the issue if you are good with the solution.
Solution: Added the 'What is your name?' message inside .then, so that the 'Try again' message is always sent first before the next message.
bot.sendMessage(msg.chat.id, "Try again.").then(() => {
reportSent = false;
reportDetails = {};
// Ask the user again
bot.sendMessage(msg.chat.id, "What is your name?");
reportStarted = true;
});
Result:
Bot intermittently says "What is your name" before "Try again"