1.7 KiB
1.7 KiB
summary, read_when
| summary | read_when | ||
|---|---|---|---|
| Poll sending via gateway + CLI |
|
Polls
Updated: 2026-01-06
Supported providers
- WhatsApp (web provider)
- Discord
CLI
# WhatsApp
clawdbot poll --to +15555550123 -q "Lunch today?" -o "Yes" -o "No" -o "Maybe"
clawdbot poll --to 123456789@g.us -q "Meeting time?" -o "10am" -o "2pm" -o "4pm" -s 2
# Discord
clawdbot poll --to channel:123456789 -q "Snack?" -o "Pizza" -o "Sushi" --provider discord
clawdbot poll --to channel:123456789 -q "Plan?" -o "A" -o "B" --provider discord --duration-hours 48
Options:
--provider:whatsapp(default) ordiscord--max-selections: how many choices a voter can select (default: 1)--duration-hours: Discord-only (defaults to 24 when omitted)
Gateway RPC
Method: poll
Params:
to(string, required)question(string, required)options(string[], required)maxSelections(number, optional)durationHours(number, optional)provider(string, optional, default:whatsapp)idempotencyKey(string, required)
Provider differences
- WhatsApp: 2-12 options,
maxSelectionsmust be within option count, ignoresdurationHours. - Discord: 2-10 options,
durationHoursclamped to 1-768 hours (default 24).maxSelections > 1enables multi-select; Discord does not support a strict selection count.
Agent tool (Discord)
The Discord tool action poll still uses question, answers, optional allowMultiselect, durationHours, and content. The gateway/CLI poll model maps allowMultiselect to maxSelections > 1.
Note: Discord has no “pick exactly N” mode; maxSelections is treated as a boolean (> 1 = multiselect).