DiscordPoll
Documentation / @discordeno/bot / DiscordPoll
Interface: DiscordPoll
Defined in: packages/types/dist/types/discord/poll.d.ts:5
https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure
Properties
allow_multiselect
allow_multiselect:
boolean
Defined in: packages/types/dist/types/discord/poll.d.ts:18
Whether a user can select multiple answers
answers
answers:
DiscordPollAnswer
[]
Defined in: packages/types/dist/types/discord/poll.d.ts:9
Each of the answers available in the poll. There is a maximum of 10 answers per poll.
expiry
expiry:
null
|string
Defined in: packages/types/dist/types/discord/poll.d.ts:16
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.
layout_type
layout_type:
Default
Defined in: packages/types/dist/types/discord/poll.d.ts:20
The layout type of the poll
question
question:
DiscordPollMedia
Defined in: packages/types/dist/types/discord/poll.d.ts:7
The question of the poll. Only text
is supported.
results?
optional
results:DiscordPollResult
Defined in: packages/types/dist/types/discord/poll.d.ts:28
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 DiscordPollResult.is_finalized to true