Luiz Carvalho
Luiz Carvalho

Reputation: 1419

Botpress UMM send letter by letter with Facebook Messenger

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:

enter image description here

How I fix this?

Upvotes: 1

Views: 137

Answers (1)

user9081620
user9081620

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

Related Questions