This repository has been archived by the owner on Apr 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.js
76 lines (73 loc) · 1.96 KB
/
info.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
module.exports = function(controller) {
controller.hears(
message =>
message.intent === 'greetings' ||
Object.keys(message.entities).some(entity => entity === 'greetings'),
'message',
async (bot, message) => {
await bot.reply(
message,
"Hello there my fellow Genosse! Welcome to Resplice, the world's best contact management application"
)
}
)
controller.hears(
message =>
message.intent === 'thanks' ||
Object.keys(message.entities).some(entity => entity === 'thanks'),
'message',
async (bot, message) => {
await bot.reply(message, 'You are very welcome!')
}
)
controller.hears(
message => message.intent === 'description',
'message',
async (bot, message) => {
await bot.reply(
message,
'I am the destroyer of out-of-date contact information!! Muhahahaha!'
)
await bot.reply(
message,
'On a more serious note, I am the Resplice bot. I can help you manage your shares and contacts or assist with you with your Resplice account.'
)
await bot.reply(message, {
text: 'Type help or select the reply below to see my functionality.',
quick_replies: [
{
title: 'Help',
payload: 'help'
}
]
})
}
)
controller.hears(
message => message.intent === 'help',
'message',
async (bot, message) => {
await bot.reply(message, {
text: 'Sure, I can help you out.\nWhat would you like to do?',
quick_replies: [
{
title: 'Create an account',
payload: 'register'
},
{
title: 'Reset my password',
payload: 'password_reset'
},
{
title: 'Find a contact',
payload: 'search'
},
{
title: 'Share information',
payload: 'sharing_send'
}
]
})
}
)
}