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

x/mtkruto/client/3_types.ts>SendPollParams

[WIP] Cross-runtime JavaScript library for building Telegram clients
Go to Latest
interface SendPollParams
import { type SendPollParams } from "https://deno.land/x/mtkruto@0.1.0/client/3_types.ts";

Properties

optional
isAnonymous: boolean

True, if the poll needs to be anonymous, defaults to True

optional
type: "quiz" | "regular"

The type of the poll. Defaults to regular.

optional
allowMultipleAnswers: boolean

True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False

optional
correctOptionIndex: number

Index of the correct option. Required for quizzes.

optional
explanation: string

Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing

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

Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.

optional
closeDate: Date

Point in time when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period.

optional
isClosed: boolean

Pass True if the poll needs to be immediately closed. This can be useful for poll preview.

optional
disableNotification: boolean

Whether to send the message in a silent way without making a sound on the recipients' clients.

optional
replyToMessageId: number

The identifier of a message to reply to.

optional
messageThreadId: number

The identifier of a thread to send the message to.

optional
sendAs: ChatID

The identifier of the chat to send the message on behalf of. User-only.

The reply markup of the message. Bot-only.

optional
protectContent: boolean

Whether to protect the contents of the message from copying and forwarding.