telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Interface SendPollOptions

    Options for Bot.sendPoll.

    interface SendPollOptions {
        allow_adding_options?: boolean;
        allow_paid_broadcast?: boolean;
        allows_multiple_answers?: boolean;
        allows_revoting?: boolean;
        business_connection_id?: string;
        chat_id: string | number;
        close_date?: number;
        correct_option_ids?: number[];
        country_codes?: string[];
        description?: string;
        description_entities?: MessageEntity[];
        description_parse_mode?: ParseMode;
        disable_notification?: boolean;
        explanation?: string;
        explanation_entities?: MessageEntity[];
        explanation_media?: InputMedia;
        explanation_parse_mode?: ParseMode;
        hide_results_until_closes?: boolean;
        is_anonymous?: boolean;
        is_closed?: boolean;
        media?: InputMedia;
        members_only?: boolean;
        message_effect_id?: string;
        message_thread_id?: number;
        open_period?: number;
        options: InputPollOption[];
        protect_content?: boolean;
        question: string;
        question_entities?: MessageEntity[];
        question_parse_mode?: ParseMode;
        reply_markup?: ReplyMarkup;
        reply_parameters?: ReplyParameters;
        shuffle_options?: boolean;
        type?: PollType;
    }
    Index
    allow_adding_options?: boolean

    Pass True, if users can add new options to the poll.

    allow_paid_broadcast?: boolean

    Pass True to allow paid broadcast of the message.

    allows_multiple_answers?: boolean

    True, if the poll allows multiple answers, ignored for quizzes, defaults to False.

    allows_revoting?: boolean

    Pass True, if the poll allows users to change their vote; polls can't be anonymous if revoting is allowed.

    business_connection_id?: string

    Unique identifier of the business connection on behalf of which the message will be sent.

    chat_id: string | number

    Unique identifier for the target chat or username of the target channel.

    close_date?: number

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

    correct_option_ids?: number[]

    A list of 0-based identifiers of known answer option(s) that are correct, required for polls in quiz mode.

    country_codes?: string[]

    A list of ISO 3166-1 alpha-2 country codes that restrict which users can participate in the poll.

    description?: string

    Description of the poll.

    description_entities?: MessageEntity[]

    A list of special entities that appear in the description.

    description_parse_mode?: ParseMode

    Mode for parsing entities in the description.

    disable_notification?: boolean

    Sends the message silently. Users will receive a notification with no sound.

    explanation?: string

    Text that is shown when a user chooses an incorrect answer or taps on the lamp icon, 0-200 characters.

    explanation_entities?: MessageEntity[]

    A list of special entities that appear in the poll explanation.

    explanation_media?: InputMedia

    Media that is shown together with the poll explanation.

    explanation_parse_mode?: ParseMode

    Mode for parsing entities in the explanation.

    hide_results_until_closes?: boolean

    Pass True, if the poll results are hidden until the poll is closed.

    is_anonymous?: boolean

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

    is_closed?: boolean

    Pass True if the poll needs to be immediately closed.

    media?: InputMedia

    Media that is shown together with the poll.

    members_only?: boolean

    Pass True, if the poll is accessible to chat members only.

    message_effect_id?: string

    Unique identifier of the message effect to be added to the message.

    message_thread_id?: number

    Unique identifier for the target message thread (topic) of the forum.

    open_period?: number

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

    options: InputPollOption[]

    A list of 2-10 answer options.

    protect_content?: boolean

    Protects the contents of the sent message from forwarding and saving.

    question: string

    Poll question, 1-300 characters.

    question_entities?: MessageEntity[]

    A list of special entities that appear in the poll question.

    question_parse_mode?: ParseMode

    Mode for parsing entities in the question.

    reply_markup?: ReplyMarkup

    Additional interface options.

    reply_parameters?: ReplyParameters

    Description of the message to reply to.

    shuffle_options?: boolean

    Pass True, if the order of the answer options must be shuffled for each user.

    type?: PollType

    Poll type, 'quiz' or 'regular', defaults to 'regular'.