Guest User

Untitled

a guest
Dec 13th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. const GetLastNewsHandler = {
  2. canHandle(handlerInput) {
  3. const request = handlerInput.requestEnvelope.request;
  4. return request.type === 'IntentRequest'
  5. && request.intent.name === 'LastNewsIntent';
  6. },
  7. async handle(handlerInput) {
  8. const last_news = await getLastNews();
  9. return handlerInput.responseBuilder
  10. .speak("" + last_news)
  11. .reprompt(HELP_REPROMPT)
  12. .getResponse();
  13. },
  14. };
Add Comment
Please, Sign In to add comment