-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabasko.js
35 lines (32 loc) · 1.14 KB
/
tabasko.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
const Alexa = require('alexa-sdk');
const Results = require('results');
exports.handler = function (event, context, callback) {
const alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
const handlers = {
// No intent launch
'LaunchRequest':function(){
var audioFile = '<audio src="https://s3.amazonaws.com/media.cloutclinic.fuego/tabasko+welcome.mp3" />';
var rxGang = '<audio src="https://s3.amazonaws.com/media.cloutclinic.fuego/rx+gang.mp3" />';
this.emit(':ask', `${audioFile}`, `${rxGang}`);
},
'TabaskoResponse':function(){
var audioFile = Results.getResults();
this.emit(':tell', `${audioFile}`);
},
'AMAZON.HelpIntent': function () {
const speechOutput = this.t('HELP_MESSAGE');
const reprompt = this.t('HELP_MESSAGE');
this.emit(':ask', speechOutput, reprompt);
},
'AMAZON.CancelIntent': function () {
var audioFile = '<audio src="https://s3.amazonaws.com/media.cloutclinic.fuego/here+for+you.mp3" />'
this.emit(':tell', `${audioFile}`);
},
'AMAZON.StopIntent': function () {
this.emit(':tell', this.t('STOP_MESSAGE'));
},
};