Interface Poll

Describes a poll.

interface Poll {
    @type: "poll";
    close_date: number;
    id: string;
    is_anonymous?: boolean;
    is_closed?: boolean;
    open_period: number;
    options: PollOption[];
    question: FormattedText;
    recent_voter_ids: MessageSender[];
    total_voter_count: number;
    type: PollType;
}

Properties

@type: "poll"
close_date: number

Point in time (Unix timestamp) when the poll will automatically be closed.

id: string

Unique poll identifier.

is_anonymous?: boolean

True, if the poll is anonymous.

is_closed?: boolean

True, if the poll is closed.

open_period: number

Amount of time the poll will be active after creation, in seconds.

options: PollOption[]

List of poll answer options.

question: FormattedText

Poll question; 1-300 characters. Only custom emoji entities are allowed.

recent_voter_ids: MessageSender[]

Identifiers of recent voters, if the poll is non-anonymous.

total_voter_count: number

Total number of voters, participating in the poll.

type: PollType

Type of the poll.