Skip to content

Message templates

The header, footer, thread message and close notice of your polls are Liquid templates. Edit them in Dashboard → Message; the preview updates while you type.

Result

What do we do on Friday night?
🎮 Minecraft build battle: 49.5%
🍿 Movie night: 32%
🃏 Card games: 18.6%
81 voters · in 2 days

Variables

{{ poll.question }}The question
{{ poll.description }}Extra text below the question
{{ poll.type }}"Poll" or "Quick Poll" in the poll's language
{{ poll.status }}draft, scheduled, running or closed
{{ poll.votes }}All votes, weighted
{{ poll.voters }}How many members voted
{{ poll.creator.name / .mention / .id }}Who created the poll
{{ poll.createdAt / startsAt / endsAt / closedAt }}Unix timestamps, use the timestamp filter
{{ poll.closeReason }}Why the poll closed
{{ poll.maxChoices }}How many choices a member may pick
{{ poll.anonymous / voteChange / weighted / hideResults }}Poll options (true/false)
{{ poll.webUrl / url }}Web page / Discord message link
{{ choices }}List: id, text, emoji, votes, voters, percent, winner
{{ choice.emoji / name / percent / votesText / number / winner }}In the choice line: this choice (emoji, name, percent, votes, votesText, number, winner)
{{ showResults }}In the choice line: whether results are shown
{{ winner }}The winning choice once closed
{{ requirements }}List of voting requirements: type, text
{{ weights }}List of role weights: role, weight
{{ closeConditions.maxVoters / choiceVotes }}Automatic close limits
{{ labels }}Ready-made texts in the server language (title, voters, by, closedNotice, …)
{{ language }}The language code of the message

Filters

All standard Liquid filters (upcase, truncate, join, …) and these:

timestamp{{ poll.endsAt | timestamp: 'R' }}
number{{ poll.votes | number }}
bar{{ choice.percent | bar: 10 }}
duration{{ 3600 | duration }}
plural{{ poll.voters | plural: 'voter' }}
mention / role / channel{{ poll.creator.id | mention }}

Examples

Default header

## {% if poll.status == 'closed' %}🔒 {% endif %}{{ poll.question }}

Default footer

-# {{ labels.voters }}{% if poll.weighted %} · ⚖️ {{ labels.weighted }}{% endif %}{% if poll.anonymous %} · 🕶️ {{ labels.anonymous }}{% endif %} · {% if poll.status == 'closed' %}{{ labels.closed }} {{ poll.closedAt | timestamp }}{% else %}{{ labels.by }}{% endif %}

Default choice line

{% if choice.winner %}🏆 {% endif %}{% if choice.emoji != '' %}{{ choice.emoji }} {% endif %}**{{ choice.name }}**{% if showResults %}
`{{ choice.percent | bar: 14 }}` **{{ choice.percent | number }}%** · {{ choice.votesText }}{% endif %}

Default close notice

🔒 {{ labels.closedNotice }}{% if winner %} {{ labels.winnerNotice }}{% endif %}

Mention the creator

{{ poll.creator.id | mention }}

Show the requirements

{% if requirements.size > 0 %}-# {{ requirements | map: 'text' | join: ', ' }}{% endif %}

Old placeholders

Templates from the previous version keep working. These placeholders are still replaced:

{POLL_STATE_EMOJI}{POLL_TYPE}{POLL_LINK}{QUESTION}{CREATOR}{CREATOR_ID}{TIME_PARSED}{TIME_INDICATOR}{TIME_LEFT_TIMESTAMP}{TIMESTAMP_R}{TIMESTAMP_FULL}{TIMESTAMP_SHORT}{TIMESTAMP_DATE}{TIMESTAMP_TIME}{ALL_VOTES_COUNT}{ANONYM_POLL}{ALLOWED_TO_VOTE_CHANGE}{MAX_CHOICES}{CREATED_TIMESTAMP}{TIMED_POLL_EMOJI}{ALLOWED_ROLES}