Polls
Poll system with buttons, timers, and real-time vote counting.
Commands
/poll
Creates a new poll in the current channel with voting buttons.
| Parameter | Type | Required | Description |
|---|---|---|---|
| question | string | Yes | Poll question (max 256 characters) |
| option1 | string | Yes | First option |
| option2 | string | Yes | Second option |
| option3 | string | No | Third option |
| option4 | string | No | Fourth option |
| option5 | string | No | Fifth option |
| option6 | string | No | Sixth option |
| option7 | string | No | Seventh option |
| option8 | string | No | Eighth option |
| option9 | string | No | Ninth option |
| option10 | string | No | Tenth option |
| duration | string | No | Duration (e.g., 30m, 1h, 24h, 7d, 2w). Default from configuration. |
| anonymous | boolean | No | Hide poll author (overrides default setting) |
| multiple | boolean | No | Allow multiple votes (overrides default setting) |
Permissions: Configurable (everyone / moderation_roles / custom)
Example: /poll question:What language do you prefer? option1:Polish option2:English option3:Both duration:24h
Success:
- Sends embed with question, options, and buttons to the channel (visible to all)
- Ephemeral confirmation for the creator
- Log in "polls" module
Errors:
- Missing permissions to create polls
- Invalid duration format
Supported formats: 30m (minutes), 1h (hours), 7d (days), 2w (weeks).
/polls
Displays a list of active (open) polls on the server.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Permissions: Everyone
Example: /polls
Success: Ephemeral embed with a list of up to 10 active polls (question, channel, number of options, expiration time)
Errors:
- No active polls (info message)
Voting
Voting is done by clicking buttons under the poll:
Single-vote mode (default)
- Clicking an option → casts a vote
- Clicking the same option again → retracts the vote
- Clicking a different option → changes the vote (old vote removed)
Multiple-vote mode
- Clicking an option → adds/retracts vote (toggle)
- Can vote on multiple options simultaneously
After each vote, the embed is automatically updated with new vote counts and percentages.
Auto-closing
Polls with a set duration are automatically closed after expiration:
- Every 60 seconds the bot checks
expires_atof all open polls - After expiration:
- Embed gets the prefix "📊 POLL CLOSED" and changes color to gray
- A visual bar chart with results is added
- Buttons are disabled
- Log in "polls" module
Configuration
| Option | Description | Default Value |
|---|---|---|
color | Poll embed color (hex) | #5865F2 |
default_duration | Default duration | none (no limit) |
default_anonymous | Anonymous by default | false |
default_multiple | Multiple votes by default | false |
create_permission | Who can create polls | everyone |
create_roles | Roles for custom permission | none |
When a poll is anonymous, the embed doesn't show the author (no "Author" section). The footer shows "Anonymous". Votes are still assigned to users in the database (for deduplication purposes), but are not publicly visible.