Cancel intent response

Added response for the cancel intent and removed the duplicate cancel
intent functions.
This commit is contained in:
sharepointalex 2016-10-27 13:05:36 +01:00 committed by Joseph J. Schmitt
parent 34c2cbd46c
commit 6268e392e2
2 changed files with 2 additions and 5 deletions

BIN
couchpotato.zip Normal file

Binary file not shown.

View File

@ -7,6 +7,7 @@ var WELCOME_DESCRIPTION = 'This skill allows you to manage your Couch Potato mov
var HELP_RESPONSE = ['You can ask Couch Potato about the movies in your queue or add new movies',
'to it. Try asking "is The Godfather on the list?". If it\'s not and you want to add it, try',
'saying "add The Godfather".'].join(' ');
var CANCEL_RESPONSE = 'Exiting Couch Potato';
var config = require('dotenv').config();
var cp = new CouchPotato({
@ -124,11 +125,7 @@ function handleNoIntent(req, resp) {
}
function handleCancelIntent(req, resp) {
resp.shouldEndSession(true).send();
}
function handleCancelIntent(req, resp) {
resp.say(HELP_RESPONSE).send();
resp.say(CANCEL_RESPONSE).shouldEndSession(true).send();
}
module.exports = {