Umfragen

Unterstützte Channels

  • WhatsApp (Web-Channel)
  • 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"

Optionen:

  • --channel: whatsapp (Standard), discord oder msteams
  • --poll-multi: Mehrfachauswahl erlauben
  • --poll-duration-hours: Nur für Discord (Standard: 24, wenn nicht angegeben)

Gateway RPC

Methode: poll

Parameter:

  • to (string, erforderlich)
  • question (string, erforderlich)
  • options (string[], erforderlich)
  • maxSelections (number, optional)
  • durationHours (number, optional)
  • channel (string, optional, Standard: whatsapp)
  • idempotencyKey (string, erforderlich)

Channel-Unterschiede

  • WhatsApp: 2-12 Optionen, maxSelections muss innerhalb der Optionsanzahl liegen, ignoriert durationHours.
  • Discord: 2-10 Optionen, durationHours wird auf 1-768 Stunden begrenzt (Standard: 24). maxSelections > 1 aktiviert Mehrfachauswahl; Discord unterstützt keine strikte Auswahlanzahl.
  • MS Teams: Adaptive Card-Umfragen (von OpenClaw verwaltet). Keine native Umfrage-API; durationHours wird ignoriert.

Agent-Tool (Message)

Nutze das message-Tool mit der poll-Aktion (to, pollQuestion, pollOption, optional pollMulti, pollDurationHours, channel).

Hinweis: Discord hat keinen “wähle genau N”-Modus; pollMulti entspricht der Mehrfachauswahl. Teams-Umfragen werden als Adaptive Cards gerendert und erfordern, dass das Gateway online bleibt, um Stimmen in ~/.openclaw/msteams-polls.json zu erfassen.