Description
Add the ability to create WhatsApp polls programmatically via the CLI and gateway RPC. This enables bot tools to create interactive polls in group chats for decisions, voting, and engagement.
Use Case
- Creating polls for group decisions ("Lunch today?", "Meeting time preference?")
- Scheduled polls via cron jobs
- Interactive group engagement
Proposed Implementation
Gateway Protocol
Add poll RPC method with params:
{
to: string; // Recipient JID
question: string; // Poll question
options: string[]; // 2-12 options
selectableCount?: number; // How many options user can select (default: 1)
idempotencyKey: string;
}
ActiveWebListener
Add sendPoll(to, question, options, selectableCount?) method to interface, with implementation using Baileys:
sock.sendMessage(jid, {
poll: {
name: question,
values: options,
selectableCount: 1,
}
});
CLI Command
clawdis poll --to "GROUP_JID" -q "Question?" -o "Yes" -o "No" -o "Maybe"
Additional Context
Baileys already supports polls via the poll message type. This feature would expose that capability through the Clawdis gateway and CLI.
Description
Add the ability to create WhatsApp polls programmatically via the CLI and gateway RPC. This enables bot tools to create interactive polls in group chats for decisions, voting, and engagement.
Use Case
Proposed Implementation
Gateway Protocol
Add poll RPC method with params:
ActiveWebListener
Add
sendPoll(to, question, options, selectableCount?)method to interface, with implementation using Baileys:CLI Command
clawdis poll --to "GROUP_JID" -q "Question?" -o "Yes" -o "No" -o "Maybe"Additional Context
Baileys already supports polls via the poll message type. This feature would expose that capability through the Clawdis gateway and CLI.