-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbottender.config.js
102 lines (102 loc) · 2.54 KB
/
bottender.config.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
93
94
95
96
97
98
99
100
101
102
module.exports = {
session: {
driver: 'memory',
stores: {
memory: {
maxSize: 500,
},
file: {
dirname: '.sessions',
},
redis: {
port: 6379,
host: '127.0.0.1',
password: 'auth',
db: 0,
},
mongo: {
url: 'mongodb://localhost:27017',
collectionName: 'sessions',
},
},
},
initialState: {},
channels: {
messenger: {
enabled: true,
path: '/webhooks/messenger',
pageId: process.env.MESSENGER_PAGE_ID,
accessToken: process.env.MESSENGER_ACCESS_TOKEN,
appId: process.env.MESSENGER_APP_ID,
appSecret: process.env.MESSENGER_APP_SECRET,
verifyToken: process.env.MESSENGER_VERIFY_TOKEN,
profile: {
getStarted: {
payload: 'GET_STARTED',
},
greeting: [
{
locale: 'default',
text: 'Hello {{user_first_name}}! Welcome to COVID-19 Bot!',
},
],
persistentMenu: [
{
locale: 'default',
composerInputDisabled: false,
callToActions: [
{
type: 'postback',
title: 'Show the latest global numbers',
payload: 'LATEST_GLOBAL',
},
{
type: 'postback',
title: 'Show the latest US numbers',
payload: 'LATEST_US',
},
{
type: 'web_url',
title: 'WHO website',
url: 'https://www.who.int/',
webviewHeightRatio: 'full',
},
],
},
],
},
},
whatsapp: {
enabled: false,
path: '/webhooks/whatsapp',
accountSid: process.env.WHATSAPP_ACCOUNT_SID,
authToken: process.env.WHATSAPP_AUTH_TOKEN,
phoneNumber: process.env.WHATSAPP_PHONE_NUMBER,
},
line: {
enabled: true,
path: '/webhooks/line',
accessToken: process.env.LINE_ACCESS_TOKEN,
channelSecret: process.env.LINE_CHANNEL_SECRET,
},
telegram: {
enabled: true,
path: '/webhooks/telegram',
accessToken: process.env.TELEGRAM_ACCESS_TOKEN,
},
slack: {
enabled: false,
path: '/webhooks/slack',
accessToken: process.env.SLACK_ACCESS_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
},
viber: {
enabled: false,
path: '/webhooks/viber',
accessToken: process.env.VIBER_ACCESS_TOKEN,
sender: {
name: 'xxxx',
},
},
},
};