Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// APP INITIALIZATION
// ------------------------------------------------------------------
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const { SpeechMarkdown } = require('jovo-plugin-speechmarkdown');
const app = new App();
app.use(
new Alexa(),
new GoogleAssistant(),
new JovoDebugger(),
new FileDb(),
new SpeechMarkdown()
);
// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------
app.setHandler({
LAUNCH() {
return this.toIntent('HelloWorldIntent');
},
HelloWorldIntent() {
this.ask('(Hello World)[interjection] [1s] What\'s your name?', 'Please [500ms] tell me your name.');
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------
const {App} = require('jovo-framework');
const {Alexa} = require('jovo-platform-alexa');
const {GoogleAssistant} = require('jovo-platform-googleassistant');
const {JovoDebugger} = require('jovo-plugin-debugger');
const {FileDb} = require('jovo-db-filedb');
const app = new App();
app.use(
new Alexa(),
new GoogleAssistant(),
new JovoDebugger(),
new FileDb()
);
// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------
app.setHandler({
LAUNCH() {
this.toIntent('HelloWorldIntent');
},
HelloWorldIntent() {
this.ask('Hello World! What\'s your name?', 'Please tell me your name.');
},
Alexa,
BodyTemplate1,
BodyTemplate2,
BodyTemplate3,
BodyTemplate6,
BodyTemplate7,
ListTemplate1,
ListTemplate2,
ListTemplate3} = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const app = new App();
app.use(
new Alexa(),
new JovoDebugger(),
);
app.setHandler({
LAUNCH() {
// return this.toIntent('BodyTemplate1Intent');
// return this.toIntent('BodyTemplate2Intent');
// return this.toIntent('BodyTemplate3Intent');
// return this.toIntent('BodyTemplate6Intent');
// return this.toIntent('BodyTemplate7Intent');
return this.toIntent('ListTemplate1Intent');
// return this.toIntent('ListTemplate2Intent');
// return this.toIntent('ListTemplate3Intent');
},
BodyTemplate1Intent() {
return this.$alexaSkill
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const { DynamoDb } = require('jovo-db-dynamodb');
const { DatastoreDb } = require('jovo-db-datastore');
const { MySQL } = require('jovo-db-mysql');
const app = new App();
Util.consoleLog();
app.use(
new GoogleAssistant(),
new Alexa(),
new JovoDebugger(),
new FileDb(),
new MySQL({
tableName: 'users',
connection: {
host : 'localhost',
user : 'root',
password : '',
database : 'test'
}
})
);
app.setHandler({
async LAUNCH() {
console.log(this.$user.$data.lastVisit);
const { App } = require('jovo-framework');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const app = new App();
app.use(
new GoogleAssistant(),
new Alexa(),
new JovoDebugger(),
new FileDb(),
);
app.hook('before.platform.output', async (error, host, jovo) => {
const pollyName = 'Hans';
if (jovo.isAlexaSkill()) {
if (jovo.$output.tell) {
jovo.$output.tell.speech = `${jovo.$output.tell.speech}`;
}
if (jovo.$output.ask) {
jovo.$output.ask.speech = `${jovo.$output.ask.speech}`;
jovo.$output.ask.reprompt = `${jovo.$output.ask.reprompt}`;
}
}
});