Umfragen
Unterstützte Channels
- Telegram
- WhatsApp (Web-Channel)
- Discord
- MS Teams (Adaptive Cards)
CLI
# Telegram
openclaw message poll --channel telegram --target 123456789 \
--poll-question "Ship it?" --poll-option "Yes" --poll-option "No"
openclaw message poll --channel telegram --target -1001234567890:topic:42 \
--poll-question "Pick a time" --poll-option "10am" --poll-option "2pm" \
--poll-duration-seconds 300
# 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"
Optionen:
--channel:whatsapp(Standard),telegram,discordodermsteams--poll-multi: Mehrfachauswahl erlauben--poll-duration-hours: nur Discord (Standard: 24 wenn weggelassen)--poll-duration-seconds: nur Telegram (5-600 Sekunden)--poll-anonymous/--poll-public: nur Telegram, Sichtbarkeit der Umfrage
Gateway RPC
Methode: poll
Parameter:
to(string, erforderlich)question(string, erforderlich)options(string[], erforderlich)maxSelections(number, optional)durationHours(number, optional)durationSeconds(number, optional, nur Telegram)isAnonymous(boolean, optional, nur Telegram)channel(string, optional, Standard:whatsapp)idempotencyKey(string, erforderlich)
Channel-Unterschiede
- Telegram: 2-10 Optionen. Unterstützt Forum-Topics über
threadIdoder:topic:-Targets. NutztdurationSecondsstattdurationHours, begrenzt auf 5-600 Sekunden. Unterstützt anonyme und öffentliche Umfragen. - WhatsApp: 2-12 Optionen,
maxSelectionsmuss innerhalb der Optionsanzahl liegen, ignoriertdurationHours. - Discord: 2-10 Optionen,
durationHourswird auf 1-768 Stunden begrenzt (Standard 24).maxSelections > 1aktiviert Mehrfachauswahl; Discord unterstützt keine strikte Auswahlanzahl. - MS Teams: Adaptive-Card-Umfragen (von OpenClaw verwaltet). Keine native Umfrage-API;
durationHourswird ignoriert.
Agent-Tool (Message)
Nutze das message-Tool mit poll-Action (to, pollQuestion, pollOption, optionales pollMulti, pollDurationHours, channel).
Für Telegram akzeptiert das Tool auch pollDurationSeconds, pollAnonymous und pollPublic.
Nutze action: "poll" für die Umfrage-Erstellung. Poll-Felder zusammen mit action: "send" werden abgelehnt.
Hinweis: Discord hat keinen „wähle genau N”-Modus; pollMulti wird auf Mehrfachauswahl abgebildet.
Teams-Umfragen werden als Adaptive Cards gerendert und erfordern, dass das Gateway online bleibt,
um Stimmen in ~/.openclaw/msteams-polls.json aufzuzeichnen.