ultra-telegram-framework
    Preparing search index...

    Interface SendPollParams

    interface SendPollParams {
        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?: string;
        disable_notification?: boolean;
        explanation?: string;
        explanation_entities?: MessageEntity[];
        explanation_media?: InputPollMedia;
        explanation_parse_mode?: string;
        hide_results_until_closes?: boolean;
        is_anonymous?: boolean;
        is_closed?: boolean;
        media?: InputPollMedia;
        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?: string;
        reply_markup?:
            | InlineKeyboardMarkup
            | ReplyKeyboardMarkup
            | ReplyKeyboardRemove
            | ForceReply;
        reply_parameters?: ReplyParameters;
        shuffle_options?: boolean;
        type?: string;
    }
    Index

    Properties

    allow_adding_options?: boolean

    Pass True, if answer options can be added to the poll after creation; not supported for anonymous polls and quizzes

    allow_paid_broadcast?: boolean

    Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.

    allows_multiple_answers?: boolean

    Pass True, if the poll allows multiple answers, defaults to False

    allows_revoting?: boolean

    Pass True, if the poll allows to change chosen answer options, defaults to False for quizzes and to True for regular polls

    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 bot, supergroup or channel in the format @username. Polls can't be sent to channel direct messages chats.

    close_date?: number

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

    correct_option_ids?: number[]

    A JSON-serialized list of monotonically increasing 0-based identifiers of the correct answer options, required for polls in quiz mode

    country_codes?: string[]

    A JSON-serialized list of 0-12 two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which users can vote in the poll; for channel chats only. If omitted or empty, then users from any country can participate in the poll.

    description?: string

    Description of the poll to be sent, 0-1024 characters after entities parsing

    description_entities?: MessageEntity[]

    A JSON-serialized list of special entities that appear in the poll description, which can be specified instead of description_parse_mode

    description_parse_mode?: string

    Mode for parsing entities in the poll description. See formatting options for more details.

    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 in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing

    explanation_entities?: MessageEntity[]

    A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode

    explanation_media?: InputPollMedia

    Media added to the quiz explanation

    explanation_parse_mode?: string

    Mode for parsing entities in the explanation. See formatting options for more details.

    hide_results_until_closes?: boolean

    Pass True, if poll results must be shown only after the poll closes

    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. This can be useful for poll preview.

    Media added to the poll description

    members_only?: boolean

    Pass True, if voting is limited to users who have been members of the chat where the poll is being sent for more than 24 hours; for channel chats only

    message_effect_id?: string

    Unique identifier of the message effect to be added to the message; for private chats only

    message_thread_id?: number

    Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only

    open_period?: number

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

    options: InputPollOption[]

    A JSON-serialized list of 1-12 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 JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode

    question_parse_mode?: string

    Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed

    reply_markup?:
        | InlineKeyboardMarkup
        | ReplyKeyboardMarkup
        | ReplyKeyboardRemove
        | ForceReply

    Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user

    reply_parameters?: ReplyParameters

    Description of the message to reply to

    shuffle_options?: boolean

    Pass True, if the poll options must be shown in random order

    type?: string

    Poll type, "quiz" or "regular", defaults to "regular"