Interface InputMessagePoll

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot. Subtype of InputMessageContent.

interface InputMessagePoll {
    @type: "inputMessagePoll";
    close_date: number;
    is_anonymous?: boolean;
    is_closed?: boolean;
    open_period: number;
    options: FormattedText[];
    question: FormattedText;
    type: PollType;
}

Properties

@type: "inputMessagePoll"
close_date: number

Point in time (Unix timestamp) when the poll will automatically be closed; for bots only.

is_anonymous?: boolean

True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels.

is_closed?: boolean

True, if the poll needs to be sent already closed; for bots only.

open_period: number

Amount of time the poll will be active after creation, in seconds; for bots only.

options: FormattedText[]

List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users.

question: FormattedText

Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users.

type: PollType

Type of the poll.