Skip to main content

CreatePoll

@discordeno/bot


Documentation / @discordeno/bot / CreatePoll

Interface: CreatePoll

Defined in: packages/types/dist/types/discordeno.d.ts:1395

https://discord.com/developers/docs/resources/poll#poll-create-request-object

Properties

allowMultiselect

allowMultiselect: boolean

Defined in: packages/types/dist/types/discordeno.d.ts:1414

Whether a user can select multiple answers

Default

false

answers

answers: Omit<{ answerId: number; pollMedia: { emoji: { animated: boolean; available: boolean; id: string; managed: boolean; name: string; requireColons: boolean; roles: string[]; user: { accentColor: number; avatar: null | string; avatarDecorationData: { asset: string; skuId: string; }; banner: string; bot: boolean; discriminator: string; email: null | string; flags: number; globalName: null | string; id: string; locale: string; mfaEnabled: boolean; premiumType: PremiumTypes; publicFlags: number; system: boolean; username: string; verified: boolean; }; }; text: string; }; }, "answerId">[]

Defined in: packages/types/dist/types/discordeno.d.ts:1399

Each of the answers available in the poll, up to 10


duration

duration: number

Defined in: packages/types/dist/types/discordeno.d.ts:1408

Number of hours the poll should be open for

Remarks

up to 32 days

Default

24

layoutType?

optional layoutType: Default

Defined in: packages/types/dist/types/discordeno.d.ts:1416

The layout type of the poll


question

question: object

Defined in: packages/types/dist/types/discordeno.d.ts:1397

The question of the poll. Only text is supported.

emoji?

optional emoji: object

emoji.animated?

optional emoji.animated: boolean

emoji.available?

optional emoji.available: boolean

emoji.id?

optional emoji.id: string

emoji.managed?

optional emoji.managed: boolean

emoji.name?

optional emoji.name: string

emoji.requireColons?

optional emoji.requireColons: boolean

emoji.roles?

optional emoji.roles: string[]

emoji.user?

optional emoji.user: object

emoji.user.accentColor?

optional emoji.user.accentColor: number

emoji.user.avatar

emoji.user.avatar: null | string

emoji.user.avatarDecorationData?

optional emoji.user.avatarDecorationData: object

emoji.user.avatarDecorationData.asset

emoji.user.avatarDecorationData.asset: string

emoji.user.avatarDecorationData.skuId

emoji.user.avatarDecorationData.skuId: string

emoji.user.banner?

optional emoji.user.banner: string

emoji.user.bot?

optional emoji.user.bot: boolean

emoji.user.discriminator

emoji.user.discriminator: string

emoji.user.email?

optional emoji.user.email: null | string

emoji.user.flags?

optional emoji.user.flags: number

emoji.user.globalName

emoji.user.globalName: null | string

emoji.user.id

emoji.user.id: string

emoji.user.locale?

optional emoji.user.locale: string

emoji.user.mfaEnabled?

optional emoji.user.mfaEnabled: boolean

emoji.user.premiumType?

optional emoji.user.premiumType: PremiumTypes

emoji.user.publicFlags?

optional emoji.user.publicFlags: number

emoji.user.system?

optional emoji.user.system: boolean

emoji.user.username

emoji.user.username: string

emoji.user.verified?

optional emoji.user.verified: boolean

text?

optional text: string