Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------
const { App } = require('jovo-framework');
const { GoogleAssistant, NotificationPlugin } = require('jovo-platform-googleassistant');
const app = new App();
const googleAssistant = new GoogleAssistant();
googleAssistant.use(new NotificationPlugin());
app.use(
googleAssistant
);
// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------
app.setHandler({
async LAUNCH() {
this.toIntent('AskForNotifications');
// this.toIntent('SendNotificationIntent');
import { App } from 'jovo-framework';
import {GoogleAssistant, NotificationObject, NotificationPlugin} from 'jovo-platform-googleassistant';
import { JovoDebugger } from 'jovo-plugin-debugger';
import { FileDb } from 'jovo-db-filedb';
const app = new App();
app.use(
new GoogleAssistant().use(new NotificationPlugin()),
new JovoDebugger(),
new FileDb(),
);
app.setHandler({
async LAUNCH() {
this.toIntent('AskForNotifications');
// this.toIntent('SendNotificationIntent');
},
AskForNotifications() {
// You have to show them suggestion chips inviting them to opt-in,
// before you can send the actual permission request
this.$googleAction!.showSuggestionChips(['yes', 'no']);
this.ask('Notifications?');
},
// ------------------------------------------------------------------
// 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() {
// ------------------------------------------------------------------
// 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.');
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 { 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() {
const {App} = require('jovo-framework');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { Alexa } = require('jovo-platform-alexa');
const app = new App();
app.use(
new GoogleAssistant(),
new Alexa()
);
app.setHandler({
async LAUNCH() {
let foo = false;
let bar = true;
this.$speech
.addText('HelloWorld')
.addBreak('100ms', false)
.addAudio('http://www.any.url/test.mp3', 'Text')
.addText('Foo', foo)
.addText('Bar', bar)
.addText(['Text1', 'Text2', 'Text3'])
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}`;
}