-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (26 loc) · 1.34 KB
/
index.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
const { dialogflow, Suggestions } = require('actions-on-google');
const express = require('express');
const bodyParser = require('body-parser');
const welcome = require('./welcome');
const whereToShop = require('./whereToShop');
const showMap = require('./showMap');
// const whenToShop = require('./whenToShop');
const shoppingHour = require('./shoppingHour');
const shoppingHourHome = require('./shoppingHourHome');
const getHomeAddress = require('./getHomeAddress');
const shoppingHourHere = require('./shoppingHourHere');
const locationPermission = require('./locationPermission');
const sunday = require('./sunday');
// const whereToShop = require('whereToShop');
const app = dialogflow({ debug: true });
app.intent('Default Welcome Intent', welcome);
app.intent('where to shop', whereToShop);
app.intent('shopping on specific hour - home - address - choice', showMap);
// app.intent('when to shop', whenToShop);
app.intent('shopping on specific hour', shoppingHour);
app.intent('shopping on specific hour - home', shoppingHourHome);
app.intent('shopping on specific hour - home - address', getHomeAddress);
app.intent('shopping on specific hour - here', shoppingHourHere);
app.intent('shopping on specific hour - here - permission', locationPermission);
app.intent('sunday', sunday);
express().use(bodyParser.json(), app).listen(process.env.PORT || 8080);