Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const GetLastNewsHandler = {
- canHandle(handlerInput) {
- const request = handlerInput.requestEnvelope.request;
- return request.type === 'IntentRequest'
- && request.intent.name === 'LastNewsIntent';
- },
- async handle(handlerInput) {
- const last_news = await getLastNews();
- return handlerInput.responseBuilder
- .speak("" + last_news)
- .reprompt(HELP_REPROMPT)
- .getResponse();
- },
- };
Add Comment
Please, Sign In to add comment