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

vote_update doesn't work #3456

Open
2 tasks done
MuriloFernandesDev opened this issue Feb 3, 2025 · 1 comment
Open
2 tasks done

vote_update doesn't work #3456

MuriloFernandesDev opened this issue Feb 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@MuriloFernandesDev
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this a problem caused by your code, or is it specifically because of the library?

  • I have double-checked my code carefully.

Describe the bug.

I'm trying to get around the issue of buttons and lists that no longer work using the poll.

I'm able to send it correctly but I can't capture the vote to make a decision.

Image

Image

Image

Expected Behavior

Received vote

Steps to Reproduce the Bug or Issue

client.on("vote_update", (vote) => {
console.log("Voto atualizado:", vote);

// Resposta opcional ao usuário
client.sendMessage(vote.voter, "Obrigado por votar!");

});

if (msg.body === "!poll") {
const poll = new Poll("Poll title", ["Option 1", "Option 2"]);

  msg.reply(poll);
}

WhatsApp Account Type

Standard

Browser Type

Chrome

Operation System Type

windows

Phone OS Type

IOS

WhatsApp-Web.js Version

1.26.0

WhatsApp Web Version

2.3000.1019780051

Node.js Version

v22.12.0

Authentication Strategy

LocalAuth

Additional Context

No response

@MuriloFernandesDev MuriloFernandesDev added the bug Something isn't working label Feb 3, 2025
@BenyFilho
Copy link
Contributor

BenyFilho commented Feb 3, 2025

There's a tip to make it work. For now, it is a solution, you need to open the chat that you sent the poll.

const poll = new Poll('Do you prefer?', ['Chicken', 'Steak']);
const msgVote = await client.sendMessage('[email protected]', poll);
const chatWindow = await client.interface.openChatWindow('[email protected]');

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

2 participants