Reputation: 1419
I'm using Botpress to make a simple bot to Facebook Messenger, when I use simple String in AddQuestion
method, all works, but when I change to use UMM is sent to user letter by letter.
My content.yml
identification_cpf: 'Preciso que você me infome seu CPF (somente números)'
My index.js
with code that uses UMM string definition:
convo.threads['identification'].addQuestion('#identification_cpf', [
{
pattern: /(\d+)/i,
callback: (response) => {
convo.set('cpf', response.match)
convo.next()
}
}
])
Result:
How I fix this?
Upvotes: 1
Views: 137
Reputation:
Can you try restructuring your content.yml like this?
identification_cpf:
- text: 'Preciso que você me infome seu CPF (somente números)'
do one tab indentation on the second line.
Upvotes: 1