Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { App, Util } = 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 { LanguageModelTester } = require('jovo-plugin-lmtester');
const app = new App();
// Util.consoleLog();
app.use(
new GoogleAssistant(),
new Alexa(),
new JovoDebugger(),
new FileDb(),
new LanguageModelTester(),
);
app.setHandler({
async LAUNCH() {
return this.toIntent('HelloWorldIntent');
},
HelloWorldIntent() {
this
const { App, Util } = 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.setHandler({
LAUNCH() {
// this.$speech.t('WELCOME_ARRAY');
// return this.tell(this.$cms.resources);
console.log(this.t('WELCOME_GLOBAL'));
this.tell(this.t('WELCOME'));
import { App } from 'jovo-framework';
import { Alexa, RelativeReminder, AbsoluteReminder } from 'jovo-platform-alexa';
import { JovoDebugger } from 'jovo-plugin-debugger';
import { FileDb } from 'jovo-db-filedb';
const app = new App();
app.use(
new Alexa(),
new JovoDebugger(),
new FileDb(),
);
app.setHandler({
async LAUNCH() {
return this.toIntent('AskForRemindersIntent');
// return this.toIntent('AddRelativeReminderIntent');
// return this.toIntent('AddAbsoluteReminderIntent');
// return this.toIntent('AllRemindersIntent');
// return this.toIntent('UpdateReminderIntent');
// return this.toIntent('DeleteReminderIntent');
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------
const { Jovo } = require('jovo-core');
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
// Plugins
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const { DynamoDb } = require('jovo-db-dynamodb');
const { DashbotAlexa, DashbotGoogleAssistant } = require('jovo-analytics-dashbot');
const app = new App();
app.use(
new Alexa(),
new GoogleAssistant(),
new JovoDebugger(),
new FileDb(),
new DynamoDb(),
new DashbotAlexa(),
new DashbotGoogleAssistant()
);
// ------------------------------------------------------------------
// JOVO EXTENSIONS
// ------------------------------------------------------------------
Jovo.prototype.log = require('./jovo-ext/log.js');
'use strict';
// =================================================================================
// App Configuration
// =================================================================================
const {App} = require('jovo-framework');
const config = {
logging: true,
};
const app = new App(config);
// =================================================================================
// App Logic
// =================================================================================
app.setHandler({
'LAUNCH': function() {
this.toIntent('HelloWorldIntent');
},
'HelloWorldIntent': function() {
this.followUpState('NameState').ask('Hello World! What is your name?', 'Please tell me your name.');
},
'NameState': {
'MyNameIsIntent': function(name) {
'use strict';
// =================================================================================
// App Configuration
// =================================================================================
const {App} = require('jovo-framework');
const config = {
logging: true,
};
const app = new App(config);
// =================================================================================
// App Logic
// =================================================================================
app.setHandler({
'LAUNCH': function() {
this.toIntent('GetShoppingListIntent');
// this.toIntent('GetTodoListIntent');
// this.toIntent('AddItemToToDoListIntent');
// this.toIntent('AddItemToShoppingListIntent');
},
'GetShoppingListIntent': function() {
// Active or completed
this.user().getShoppingList('active')
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { JovoDebugger } = require('jovo-plugin-debugger');
const app = new App();
app.use(
new Alexa(),
new JovoDebugger()
);
app.setHandler({
LAUNCH() {
this.tell('Hello World');
},
CAN_FULFILL_INTENT() {
const knownSlots = ['name', 'city'] // other known slots
let canFulfillOneOrMoreSlots = false;
let canFulfillEverySlot = true;
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const app = new App();
app.use(
new Alexa()
);
app.setHandler({
async LAUNCH() {
// return this.toIntent('GetTodoListIntent');
// return this.toIntent('AddItemToTodoListIntent');
// return this.toIntent('UpdateItemTodoListIntent');
return this.toIntent('DeleteItemTodoListIntent');
},
'use strict';
// =================================================================================
// App Configuration
// =================================================================================
const {App} = require('jovo-framework');
const config = {
logging: true,
};
const app = new App(config);
// =================================================================================
// App Logic
// =================================================================================
app.setHandler({
'LAUNCH': function() {
// keep session open
this.googleAction().audioPlayer().play('https://www.url.to/file.mp3', 'song one');
this.googleAction().showSuggestionChips([' Chip1'])
this.ask('This is my song');
// close session
// this.googleAction().audioPlayer().play('https://song.url.com/song1.mp3', 'song one');
// this.tell('This is my song');
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) {