DiscordPoll
Documentation / @discordeno/bot / DiscordPoll
Interface: DiscordPoll
Defined in: packages/types/dist/types/discord.d.ts:1413
https://discord.com/developers/docs/resources/poll#poll-object
Properties
allow_multiselect
allow_multiselect:
boolean
Defined in: packages/types/dist/types/discord.d.ts:1426
Whether a user can select multiple answers
answers
answers:
DiscordPollAnswer
[]
Defined in: packages/types/dist/types/discord.d.ts:1417
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.d.ts:1424
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.d.ts:1428
The layout type of the poll
question
question:
DiscordPollMedia
Defined in: packages/types/dist/types/discord.d.ts:1415
The question of the poll. Only text
is supported.
results?
optional
results:DiscordPollResult
Defined in: packages/types/dist/types/discord.d.ts:1436
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