builderbot
builderbot copied to clipboard
[🐛]Documentation erroron addAnswer
¿Que versión estas usando?
v2
¿Sobre que afecta?
Flujo de palabras (Flow)
Describe tu problema
On your documentation: https://www.builderbot.app/en/uses-cases#switch-to-another-flow
.addAnswer(`Thanks for you answer`,async (ctx, {gotoFlow})=> {
const userAnswer = ctx.body
if(userAnswer === 'A'){
return gotoFlow(flowToA)
}
if(userAnswer === 'B'){
return gotoFlow(flowToB)
}
if(userAnswer === 'C'){
return gotoFlow(flowToC)
}
return gotoFlow(flowDefault)
})
VSCode is reporting me this error:
Argument of type '(ctx: any, { gotoFlow }: { gotoFlow: any; }) => any' is not assignable to parameter of type 'string | string[]'.ts(2345)
Reproducir error
No response
Información Adicional
No response