Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function takeWordAnswer(agent) {
- let context = agent.context.get('takeword-followup');
- let hanzi = context.parameters.hanzi;
- var correct = hanzi.translation.split("|");
- if (correct.includes(agent.parameters.answer.toLowerCase()))
- agent.add('answer is correct!');
- else
- agent.add('oh no! The correct answer was '+correct.join());
- agent.add(new Suggestion(`More`));
- agent.add(new Suggestion(`Bye!`));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement