error occured for the animal guesser app for google assistant
Clash Royale CLAN TAG#URR8PPP
error occured for the animal guesser app for google assistant
function learnThing(assistant)
const priorQuestion = assistant.getContextArgument(QUESTION_CONTEXT, ID_PARAM).value;
const guess = assistant.getContextArgument(GUESS_CONTEXT, ID_PARAM).value;
const branch = assistant.getContextArgument(GUESS_CONTEXT, BRANCH_PARAM).value;
const new_thing = assistant.getArgument(GUESSABLE_THING_PARAM);
console.log(`Priorq: $priorQuestion, guess: $guess, branch: $branch, thing: $new_thing`);
const q_promise = graph.child(priorQuestion).once('value');
const g_promise = graph.child(guess).once('value');
Promise.all([q_promise, g_promise]).then(results =>
const q_snap = results[0];
const g_snap = results[1];
const speech = `
I need to know how to tell a $new_thing from a $g_snap.val().a using a yes-no question.
The answer must be "yes" for $new_thing. What question should I use?
`;
const discrmParameters = ;
discrmParameters[LEARN_DISCRIMINATION_PARAM] = true;
assistant.setContext(LEARN_DISCRIM_CONTEXT, 2, discrmParameters);
const answerParameters = ;
answerParameters[ANSWER_PARAM] = new_thing;
assistant.setContext(ANSWER_CONTEXT, 2, answerParameters);
assistant.ask(speech);
);
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.