Skip to main content

Poll

@discordeno/botDocs


Documentation / @discordeno/bot / Poll

Interface: Poll

Properties

allowMultiselect

allowMultiselect: boolean

Whether a user can select multiple answers

Defined in

packages/bot/src/transformers/types.ts:1338


answers

answers: PollAnswer[]

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

Defined in

packages/bot/src/transformers/types.ts:1329


expiry

expiry: null | number

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.

Defined in

packages/bot/src/transformers/types.ts:1336


layoutType

layoutType: Default

The layout type of the poll

Defined in

packages/bot/src/transformers/types.ts:1340


question

question: PollMedia

The question of the poll. Only text is supported.

Defined in

packages/bot/src/transformers/types.ts:1327


results?

optional results: PollResult

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

Defined in

packages/bot/src/transformers/types.ts:1348