mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-23 17:19:21 +00:00
- Rename lobster extension → flow (dir, types, env vars, docs) - LOBSTER_* env vars → BOT_FLOW_* / BOT_* - 🦞 → 🤖 everywhere (src, docs, skills, zh-CN) - docs.bot.ai → docs.hanzo.bot - github.com/bot/bot → github.com/hanzoai/bot - @bot/* → @hanzo/bot-* (npm scope) - ~/.bot/ → ~/.hanzo/bot/ (config paths) - discord.gg/hanzo → discord.gg/XthHQQj (real Hanzo Discord) - clawhub.com → skills.hanzo.bot - ClawDock → BotDock in shell helpers - EXFOLIATE lore → Hanzo Bot branding in all locales - LOBSTER_PALETTE → BOT_PALETTE, LOBSTER_ASCII → BOT_ASCII
2.3 KiB
2.3 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Poll sending via gateway + CLI |
|
Polls |
Polls
Supported channels
- WhatsApp (web channel)
- Discord
- MS Teams (Adaptive Cards)
CLI
# WhatsApp
hanzo-bot message poll --target +15555550123 \
--poll-question "Lunch today?" --poll-option "Yes" --poll-option "No" --poll-option "Maybe"
hanzo-bot message poll --target [email protected] \
--poll-question "Meeting time?" --poll-option "10am" --poll-option "2pm" --poll-option "4pm" --poll-multi
# Discord
hanzo-bot message poll --channel discord --target channel:123456789 \
--poll-question "Snack?" --poll-option "Pizza" --poll-option "Sushi"
hanzo-bot message poll --channel discord --target channel:123456789 \
--poll-question "Plan?" --poll-option "A" --poll-option "B" --poll-duration-hours 48
# MS Teams
hanzo-bot message poll --channel msteams --target conversation:19:[email protected] \
--poll-question "Lunch?" --poll-option "Pizza" --poll-option "Sushi"
Options:
--channel:whatsapp(default),discord, ormsteams--poll-multi: allow selecting multiple options--poll-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)channel(string, optional, default:whatsapp)idempotencyKey(string, required)
Channel 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. - MS Teams: Adaptive Card polls (Hanzo Bot-managed). No native poll API;
durationHoursis ignored.
Agent tool (Message)
Use the message tool with poll action (to, pollQuestion, pollOption, optional pollMulti, pollDurationHours, channel).
Note: Discord has no “pick exactly N” mode; pollMulti maps to multi-select.
Teams polls are rendered as Adaptive Cards and require the gateway to stay online
to record votes in ~/.hanzo/bot/msteams-polls.json.