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

x/mtkruto/mod.ts>SendPollParams

Cross-runtime JavaScript library for building Telegram clients
Latest
interface SendPollParams
implements _SendCommon, _ReplyMarkupCommon
Re-export
import { type SendPollParams } from "https://deno.land/x/mtkruto@0.6.3/mod.ts";

Properties

optional
questionEntities: MessageEntity[]

The entities of the poll's question.

optional
questionParseMode: ParseMode

The parse mode to use for the poll's question. If not provided, the default parse mode will be used.

optional
optionParseMode: ParseMode

The parse mode to use for the poll's options. If not provided, the default parse mode will be used.

optional
isAnonymous: boolean

Whether the poll should be anonymous.

optional
type: "quiz" | "regular"

The type of the poll.

optional
allowMultipleAnswers: boolean

Whether multiple selections should be allowed. Only valid for regular polls.

optional
correctOptionIndex: number

Index of the correct option. Required for quiz polls.

optional
explanation: string

A text that will be shown to the user when the poll is answered. Only valid for quiz polls.

optional
explanationParseMode: ParseMode

The parse mode to use for the explanation. If not provided, the default parse mode will be used.

optional
explanationEntities: MessageEntity[]

The explanation's entities.

optional
openPeriod: number

Duration of the poll in seconds. Must be in the range of 5-600. Cannot be used simultaneously with closeDate.

optional
closeDate: Date

The time in which the poll will be closed. Must be at least 5 seconds in the future, and no more than 600. Cannot be used simultaneously with openPeriod.

optional
isClosed: boolean

Whether the poll should be closed as soon as it is sent, allowing no answers.