Botpress UMM 使用 Facebook Messenger 逐封发送
Botpress UMM send letter by letter with Facebook Messenger
当我在 AddQuestion
中使用简单字符串时,我正在使用 Botpress 为 Facebook Messenger 创建一个简单的机器人方法,一切正常,但是当我更改为使用 UMM 时,会逐个字母地发送给用户。
我的content.yml
identification_cpf: 'Preciso que você me infome seu CPF (somente números)'
我的 index.js
代码使用 UMM 字符串定义:
convo.threads['identification'].addQuestion('#identification_cpf', [
{
pattern: /(\d+)/i,
callback: (response) => {
convo.set('cpf', response.match)
convo.next()
}
}
])
结果:
我该如何解决这个问题?
你能尝试像这样重构你的 content.yml 吗?
identification_cpf:
- text: 'Preciso que você me infome seu CPF (somente números)'
在第二行缩进一个制表符。
当我在 AddQuestion
中使用简单字符串时,我正在使用 Botpress 为 Facebook Messenger 创建一个简单的机器人方法,一切正常,但是当我更改为使用 UMM 时,会逐个字母地发送给用户。
我的content.yml
identification_cpf: 'Preciso que você me infome seu CPF (somente números)'
我的 index.js
代码使用 UMM 字符串定义:
convo.threads['identification'].addQuestion('#identification_cpf', [
{
pattern: /(\d+)/i,
callback: (response) => {
convo.set('cpf', response.match)
convo.next()
}
}
])
结果:
我该如何解决这个问题?
你能尝试像这样重构你的 content.yml 吗?
identification_cpf:
- text: 'Preciso que você me infome seu CPF (somente números)'
在第二行缩进一个制表符。