Advertisement
Guest User

intentHandlers.js

a guest
Mar 21st, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. 'use strict';
  2.  
  3. var wikipediaIntent = require('./wikipediaIntent');
  4.  
  5.  
  6. var registerIntentHandlers = function (intentHandlers, skillContext) {
  7.  
  8. intentHandlers.GetFirstEventIntent = function (intent, session, response) {
  9. handleFirstEventRequest(intent, session, response);
  10. },
  11.  
  12. intentHandlers.GetNextEventIntent = function (intent, session, response) {
  13. handleNextEventRequest(intent, session, response);
  14. },
  15.  
  16. intentHandlers['AMAZON.HelpIntent'] = function (intent, session, response) {
  17. var speechOutput = "With History Buff, you can get historical events for any day of the year. " +
  18. "For example, you could say today, or August thirtieth, or you can say exit. Now, which day do you want?";
  19. var repromptOutput = "Which day do you want?";
  20. response.ask(speechOutput, repromptOutput);
  21. },
  22.  
  23. intentHandlers['AMAZON.StopIntent'] = function (intent, session, response) {
  24. var speechOutput = "Goodbye";
  25. response.tell(speechOutput);
  26. },
  27.  
  28. intentHandlers['AMAZON.CancelIntent'] = function (intent, session, response) {
  29. var speechOutput = "Goodbye";
  30. response.tell(speechOutput);
  31. }
  32. };
  33.  
  34. exports.register = registerIntentHandlers;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement