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

win is undefined #156

Open
pumpa0 opened this issue Apr 27, 2024 · 10 comments
Open

win is undefined #156

pumpa0 opened this issue Apr 27, 2024 · 10 comments

Comments

@pumpa0
Copy link

pumpa0 commented Apr 27, 2024

I'm using version 7.0.0, and win is undefined. there are 13 steps, and the progress is 92%

@WillTDA
Copy link

WillTDA commented Apr 27, 2024

Aki.win() is no longer part of the API. One solution would be to check if a guess has been made by checking the existence of aki.guess?.id_base_proposition.
Still don't fully understand why it was taken out, it made updating from v6 a pain.

@FebriansyahXd
Copy link

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

@AliyulManan123
Copy link

same

@Salientekill
Copy link

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

What would the code look like using this?

@FebriansyahXd
Copy link

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

What would the code look like using this?

if (aki.guess != undefined){
return aki.guess.name_proposition
}
if u wan fill code i will give u

@Salientekill
Copy link

Salientekill commented May 15, 2024

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

What would the code look like using this?

if (aki.guess != undefined){ return aki.guess.name_proposition } if u wan fill code i will give u

My code:

await aki.step(args)
if (aki.progress >= 90 || aki.currentStep >= 90) {
await aki.win()
jogo.now = true
bui3 = {
"1": ${prefix}fimaki sim,
"2": ${prefix}fimaki não
}
optionscmd[from] = {
sender: sender,
time: Date.now()+30000,
comandos: bui3
}
fs.writeFileSync("./DADOS/json/optionscmd.json", JSON.stringify(optionscmd, null, 2))
conn.sendMessage(from, { image: { url: aki.answers[0].absolute_picture_path },
caption: aki.answers[0].name + ": " + aki.answers[0].description + \nPor acaso este é o seu personagem?\n\n*Opções:* *1 - Sim* *2 - Não*})
}

@FebriansyahXd
Copy link

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

What would the code look like using this?

if (aki.guess != undefined){ return aki.guess.name_proposition } if u wan fill code i will give u

My code:

await aki.step(args) if (aki.progress >= 90 || aki.currentStep >= 90) { await aki.win() jogo.now = true bui3 = { "1": ${prefix}fimaki sim, "2": ${prefix}fimaki não } optionscmd[from] = { sender: sender, time: Date.now()+30000, comandos: bui3 } fs.writeFileSync("./DADOS/json/optionscmd.json", JSON.stringify(optionscmd, null, 2)) conn.sendMessage(from, { image: { url: aki.answers[0].absolute_picture_path }, caption: aki.answers[0].name + ": " + aki.answers[0].description + \nPor acaso este é o seu personagem?\n\n*Opções:* *1 - Sim* *2 - Não*}) }

are u make WhatsApp bot? sure i can help

first u wan to delete the function of if (aki.progress >= 90 || aki.currentStep >= 90)

you have to change it so

if (aki.guess != undefined) {

console.log(aki.guess) // u Can find image + answer
}

and to see the image of the answer u can find aki.guess if the game has been won

if u want help more chat DM on Instagram febriann_syh or Facebook Febriansyah

@Salientekill
Copy link

you can use aki.guess != undefined, but that will require him to achieve a score of 100%

What would the code look like using this?

if (aki.guess != undefined){ return aki.guess.name_proposition } if u wan fill code i will give u

My code:
await aki.step(args) if (aki.progress >= 90 || aki.currentStep >= 90) { await aki.win() jogo.now = true bui3 = { "1": ${prefix}fimaki sim, "2": ${prefix}fimaki não } optionscmd[from] = { sender: sender, time: Date.now()+30000, comandos: bui3 } fs.writeFileSync("./DADOS/json/optionscmd.json", JSON.stringify(optionscmd, null, 2)) conn.sendMessage(from, { image: { url: aki.answers[0].absolute_picture_path }, caption: aki.answers[0].name + ": " + aki.answers[0].description + \nPor acaso este é o seu personagem?\n\n*Opções:* *1 - Sim* *2 - Não*}) }

are u make WhatsApp bot? sure i can help

first u wan to delete the function of if (aki.progress >= 90 || aki.currentStep >= 90)

you have to change it so

if (aki.guess != undefined) {

console.log(aki.guess) // u Can find image + answer }

and to see the image of the answer u can find aki.guess if the game has been won

if u want help more chat DM on Instagram febriann_syh or Facebook Febriansyah

Obrigado

@FebriansyahXd
Copy link

same issues here, how fix?

just copy just copy what I have shared, i u want to help more klik it https://tinyurl.com/2s4jmvkv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@WillTDA @pumpa0 @FebriansyahXd @Salientekill @AliyulManan123 and others