투표
지원되는 채널
- WhatsApp (웹 채널)
- Discord
- MS Teams (Adaptive Cards)
CLI
# WhatsApp
openclaw message poll --target +15555550123 \
--poll-question "Lunch today?" --poll-option "Yes" --poll-option "No" --poll-option "Maybe"
openclaw message poll --target [email protected] \
--poll-question "Meeting time?" --poll-option "10am" --poll-option "2pm" --poll-option "4pm" --poll-multi
# Discord
openclaw message poll --channel discord --target channel:123456789 \
--poll-question "Snack?" --poll-option "Pizza" --poll-option "Sushi"
openclaw message poll --channel discord --target channel:123456789 \
--poll-question "Plan?" --poll-option "A" --poll-option "B" --poll-duration-hours 48
# MS Teams
openclaw message poll --channel msteams --target conversation:19:[email protected] \
--poll-question "Lunch?" --poll-option "Pizza" --poll-option "Sushi"
옵션:
- --channel: whatsapp (기본값), discord, 또는 msteams
- --poll-multi: 여러 옵션 선택 허용
- --poll-duration-hours: Discord 전용 (생략 시 기본값 24)
Gateway RPC
메서드: poll
파라미터:
- to (string, 필수)
- question (string, 필수)
- options (string[], 필수)
- maxSelections (number, 선택 사항)
- durationHours (number, 선택 사항)
- channel (string, 선택 사항, 기본값: whatsapp)
- idempotencyKey (string, 필수)
채널별 차이점
- WhatsApp: 2-12개 옵션, maxSelections는 옵션 개수 이내여야 하며, durationHours는 무시됩니다.
- Discord: 2-10개 옵션, durationHours는 1-768시간으로 제한됨 (기본값 24). maxSelections > 1은 다중 선택을 활성화하며, Discord는 엄격한 선택 개수를 지원하지 않습니다.
- MS Teams: Adaptive Card 투표 (OpenClaw 관리). 네이티브 투표 API가 없으며, durationHours는 무시됩니다.
Agent 도구 (Message)
poll 액션과 함께 message 도구를 사용하세요 (to, pollQuestion, pollOption, 선택적 pollMulti, pollDurationHours, channel).
참고: Discord는 "정확히 N개 선택" 모드가 없으며, pollMulti는 다중 선택에 매핑됩니다. Teams 투표는 Adaptive Card로 렌더링되며 ~/.openclaw/msteams-polls.json에 투표를 기록하기 위해 gateway가 온라인 상태를 유지해야 합니다.