Skip to main content

Poll

Documentation


Documentation / @discordeno/bot / Poll

Interface: Poll

Defined in: transformers/types.ts:1472

Properties

allowMultiselect

allowMultiselect: boolean

Defined in: transformers/types.ts:1485

Whether a user can select multiple answers


answers

answers: PollAnswer[]

Defined in: transformers/types.ts:1476

Each of the answers available in the poll. There is a maximum of 10 answers per poll.


expiry

expiry: number | null

Defined in: transformers/types.ts:1483

The time when the poll ends.

Remarks

expiry is marked as nullable to support non-expiring polls in the future, but all polls have an expiry currently.


layoutType

layoutType: Default

Defined in: transformers/types.ts:1487

The layout type of the poll


question

question: PollMedia

Defined in: transformers/types.ts:1474

The question of the poll. Only text is supported.


results?

optional results: PollResult

Defined in: transformers/types.ts:1495

The results of the poll

Remarks

This value will not be sent by discord under specific conditions where they don't fetch them on their backend. When this value is missing it should be interpreted as "Unknown results" and not as "No results" The results may not be totally accurate while the poll has not ended. When it ends discord will re-calculate all the results and set is_finalized to true