In nutshell, reply function is not part of event variable.
If you run botpress as standalone solution, reply will exist as a function, but if you run it through broad setup, reply will not be in a list of functions.
module.exports = function(bp) {
// Listens for a first message (this is a Regex)
// GET_STARTED is the first message you get on Facebook Messenger
bp.hear(/GET_STARTED|hello|hi|test|hey|holla/i, (event, next, x) => {
console.log("event:",event);
console.log("next:",next);
console.log("bp:",bp);
event.reply('#welcome') // See the file `content.yml` to see the block
})
// You can also pass a matcher object to better filter events
bp.hear({
type: /message|text/i,
text: /exit|bye|goodbye|quit|done|leave|stop/i
}, (event, next) => {
event.reply('#goodbye', {
// You can pass data to the UMM bloc!
reason: 'unknown'
})
})
}
In nutshell, reply function is not part of event variable. If you run botpress as standalone solution, reply will exist as a function, but if you run it through broad setup, reply will not be in a list of functions.
brood-kit-botpress index.ts:
botpress index.js: