Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mtkruto/3_types.ts>Poll

Cross-runtime JavaScript library for building Telegram clients
Latest
interface Poll
Re-export
import { type Poll } from "https://deno.land/x/mtkruto@0.6.2/3_types.ts";

A poll.

Properties

id: string

The identifier of the poll.

question: string

The poll's question.

questionEntities: MessageEntity[]

The entities of the poll's question.

options: PollOption[]

The poll's options.

totalVoterCount: number

The number of users who have participated in the poll.

isClosed: boolean

Whether the poll is closed.

isAnonymous: boolean

Whether the poll is anonymous.

type: "regular" | "quiz"

The type of the poll.

optional
allowMultipleAnswers: boolean

Whether the poll allows multiple answers.

optional
correctOptionIndex: number

Index of the correct option.

optional
explanation: string

A text that is shown to the user when the poll is answered.

optional
explanationEntities: MessageEntity[]

The explanation's entities.

optional
openPeriod: number

Duration of the poll in seconds.

optional
closeDate: Date

The time in which the poll will be closed.