poll() to send a poll with a title and a list of choices. Each choice can be a plain string or a object. Use option() when you want the explicit form.
poll_option content. See Messages for narrowing on incoming votes.Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Send poll prompts and receive selected options as content.
poll() to send a poll with a title and a list of choices. Each choice can be a plain string or a object. Use option() when you want the explicit form.
import { poll, option } from "spectrum-ts";
// Variadic strings
await space.send(poll("Lunch?", "Pizza", "Sushi", "Tacos"));
// Or an array, optionally using option() for clarity
await space.send(poll("Lunch?", [
option("Pizza"),
option("Sushi"),
option("Tacos"),
]));
poll_option content. See Messages for narrowing on incoming votes.Was this page helpful?