Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//index.js
app.intent('solution', (conv) => {
let message = choose(responses.solutions)[0];
// if the user doesn't have a screen, give them only the
// message plus info about getting url via a screen
if (!conv.screen){
conv.ask(message['text'] + ' To see the url switch ' +
'over to a screen');
return;
}
conv.ask(new SimpleResponse({
speech: message['hintSpeech'],
text: message['hintText'],
}));
// creates a card with a photo and a link
conv.ask(new BasicCard({
title: 'Github Repo',
buttons: new Button({
title: 'Go to Solution',
url: github + challengesName + '/' + challengesName +
'.md',
}),
image: new Image({
url: celebrationImg,
alt: 'Image of balloons or fireworks',
}),
}));
conv.ask(new Suggestions('Solution', 'Repeat Problem')
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.