Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛]Documentation erroron addAnswer #1104

Open
marcellodpAS opened this issue Oct 19, 2024 · 2 comments
Open

[🐛]Documentation erroron addAnswer #1104

marcellodpAS opened this issue Oct 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@marcellodpAS
Copy link

¿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

@marcellodpAS marcellodpAS added the bug Something isn't working label Oct 19, 2024
Copy link
Contributor

¿Alguna novedad sobre esta ISSUE?

@marcellodpAS
Copy link
Author

is there any news about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant