Skip to main content
Module

x/mtkruto/mod.ts>Poll

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

A poll.

Properties

id: string

The identifier of the poll.

question: string

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.