Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>Poll_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Poll_
extends _Poll_
import { Poll_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Poll

Constructors

new
Poll_(params: { id: bigint; closed?: true; public_voters?: true; multiple_choice?: true; quiz?: true; question: string; answers: Array<enums.PollAnswer>; close_period?: number; close_date?: number; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
answers: Array<enums.PollAnswer>

The possible answers, vote using messages.sendVote.

optional
close_date: number

Point in time (Unix timestamp) 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 close_period.

optional
close_period: number

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

optional
closed: true

Whether the poll is closed and doesn't accept any more answers

id: bigint

ID of the poll

optional
multiple_choice: true

Whether multiple options can be chosen as answer

optional
public_voters: true

Whether cast votes are publicly visible to all users (non-anonymous poll)

question: string

The question of the poll

optional
quiz: true

Whether this is a quiz (with wrong and correct answers, results shown in the return type)

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc