Skip to content

Akinator.continue doesn't works #151

@Ethan459

Description

@Ethan459

My Code:

import { Aki } from 'aki-api'
;(async (): Promise<void> => {
    const aki = new Aki({ region: 'en', childMode: true })
    await aki.start()
    console.log(aki)
    await aki.step(0)
    console.log(aki)
    await aki.step(1)
    await aki.win()
    console.log(aki)
    await aki.continue() // <---
    console.log(aki)
    await aki.step(0)
    await aki.win()
    console.log(aki)
})()

Error:

C:\Wee\node_modules\aki-api\dist\src\functions\Request.js:82
    if (!result || result.completion != 'OK' || !(checkParamProperty in result.parameters)) {
                                                                     ^

TypeError: Cannot use 'in' operator to search for 'answers' in undefined
    at request (C:\Wee\node_modules\aki-api\dist\src\functions\Request.js:82:70)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Akinator.continue (C:\Wee\node_modules\aki-api\dist\src\Akinator.js:99:24)
    at async a (C:\Wee\dist\test.js:28:5)

Additional Info:

Well, I checked it myself and this is how the api responded (for continue):

jQuery331023608747682107778_1694230210594({
    "completion": "OK"
})

Here the parameters key is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions