-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.js
92 lines (88 loc) · 1.81 KB
/
setup.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
const borq = require('borq');
const facebook = borq.facebook;
function setup (bot) {
facebook.start(bot, (err, webserver) => {
webserver.get('/', (req, res) => {
res.send('<h3>Sofia is a bot for ECD</h3>');
});
});
facebook.setGreeting( 'Sofia is here to help with your ECD needs.');
facebook.setGetStarted('get_started');
facebook.setMenu([{
locale: 'default',
composer_input_disabled: false,
call_to_actions: [
{
title: 'Help',
type: 'nested',
call_to_actions: [
{
title: 'Restart survery',
type: 'postback',
payload: 'restart',
},
],
},
{title: 'Change language',
type: 'nested',
call_to_actions: [
{
title: 'English',
type: 'postback',
payload: 'switch_en',
},
{
title: 'Bahasa',
type: 'postback',
payload: 'switch_in',
},
],
},
{
type: 'web_url',
title: 'FAQ',
url: 'https://sofia.goodbot.ai/',
webview_height_ratio: 'full',
},
],
}, {
locale: 'id_ID',
composer_input_disabled: false,
call_to_actions: [
{
title: 'Membantu',
type: 'nested',
call_to_actions: [
{
title: 'Mengulang kembali',
type: 'postback',
payload: 'restart',
},
],
},
{title: 'Ganti bahasa',
type: 'nested',
call_to_actions: [
{
title: 'Inggris',
type: 'postback',
payload: 'switch_en',
},
{
title: 'Bahasa',
type: 'postback',
payload: 'switch_in',
},
],
},
{
type: 'web_url',
title: 'FAQ',
url: 'https://sofia.goodbot.ai/',
webview_height_ratio: 'full',
},
],
},
]);
}
module.exports = setup;