> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.petto.sbs/llms.txt
> Use this file to discover all available pages before exploring further.

# Polls

> Polls that members vote on with buttons, built with a private panel.

## Overview

`!poll` opens a private panel (only you see it) where you build a poll, and posts it in the current channel when you press **Start Poll**. Members vote with buttons.

<CodeGroup>
  ```javascript Syntax theme={null}
  !poll
  ```
</CodeGroup>

## The panel

| Button | What it does |
| - | - |
| **Question** | The question, up to 200 characters. |
| **Options** | One option per line, from 2 to 10 options. |
| **Image** | A picture for the poll (leave it blank to remove it). |
| **Duration** | When the poll closes by itself: `1h`, `30m`, `1d`. Blank means it never closes. |
| **Multiple choice** | Switches between one vote per person and several votes per person. |
| **Design** | The name of one of your saved V2 [embeds](/resources/scripting/embeds#embeds-v2) to use as the look of the poll. Blank uses the default design. |
| **Start Poll** | Posts the poll in the channel. |
| **Cancel** | Throws the draft away. |

Every time you run `!poll` the panel starts empty, so an old draft never leaks into a new poll.

## Voting and closing

* Members vote with the buttons under the poll. In a **single-choice** poll each person has one vote, and pressing another option moves it. In a **multiple-choice** poll pressing an option adds your vote, and pressing it again removes it.
* The results update with a bar, the percentage and the votes of each option.
* A poll with a duration closes by itself. The person who started the poll can also end it earlier with its **End poll** button, and nobody else can.
* A closed poll shows its final results and no longer accepts votes.

A saved V2 design can use the `{poll.*}` [variables](/resources/scripting/variables) (the question, the options, the results, the votes, who started it, the winner and more).

<Info>
  The **Polls** section of the [dashboard](https://petto.sbs/dash) shows the polls that are running, live, and has a live preview of the design.
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.