Separate intents to separate modules
This commit is contained in:
17
bot/facebook/intents/drink.js
Normal file
17
bot/facebook/intents/drink.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const fbTemplate = require('claudia-bot-builder/lib/facebook/format-message')
|
||||
const {send} = require('./common')
|
||||
|
||||
const run = (msg, recipient) => {
|
||||
const reply = new fbTemplate.Text(`
|
||||
So, you'd like to drink?
|
||||
`)
|
||||
.addQuickReply('YES!', 'YES')
|
||||
.addQuickReply('No, not particulary', 'NO')
|
||||
.get()
|
||||
send(recipient.id, reply)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
keywords: ['drink', 'dring', 'water', 'gimmme'],
|
||||
run,
|
||||
}
|
||||
Reference in New Issue
Block a user