teleproto - v1.229.0
    Preparing search index...

    Interface SendPollParams

    Poll definition for TelegramClient.sendPoll.

    interface SendPollParams {
        answers: (string | SendPollAnswer)[];
        attachedMedia?: TypeInputMedia;
        closeDate?: number;
        closePeriod?: number;
        correctAnswers?: number | number[];
        countriesIso2?: string[];
        hideResultsUntilClose?: boolean;
        multipleChoice?: boolean;
        openAnswers?: boolean;
        parseMode?: any;
        publicVoters?: boolean;
        question: string;
        quiz?: boolean;
        revotingDisabled?: boolean;
        shuffleAnswers?: boolean;
        solution?: string;
        solutionEntities?: TypeMessageEntity[];
        solutionMedia?: TypeInputMedia;
        subscribersOnly?: boolean;
    }
    Index
    answers: (string | SendPollAnswer)[]
    attachedMedia?: TypeInputMedia

    Optional media attachment displayed alongside the poll.

    closeDate?: number

    Point in time when the poll will be automatically closed. Mutually exclusive with closePeriod.

    closePeriod?: number

    Amount of time in seconds the poll will be active after creation, up to the poll_close_period_max server limit (currently 600). Mutually exclusive with closeDate.

    correctAnswers?: number | number[]

    0-based index(es) of the correct answer(s) in answers, for quizzes.

    countriesIso2?: string[]

    If set, only users from the specified ISO 3166-1 alpha-2 country codes may vote.

    hideResultsUntilClose?: boolean

    Whether vote results are hidden from all participants until the poll is closed.

    multipleChoice?: boolean

    Whether multiple options can be chosen as answer.

    openAnswers?: boolean

    Whether users can add new answer options after the poll is created.

    parseMode?: any

    Parse mode override for question/answers/solution.

    publicVoters?: boolean

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

    question: string

    The poll question. Parsed with the client parse mode — only custom emoji entities are allowed here (Premium users only).

    quiz?: boolean

    Send as a quiz (with wrong and correct answers) — requires correctAnswers.

    revotingDisabled?: boolean

    If set, users cannot change their vote after casting it.

    shuffleAnswers?: boolean

    Whether answer options are displayed in a randomized order to each user.

    solution?: string

    Text shown when a user chooses an incorrect quiz answer or taps the lamp icon; 0-200 characters with at most 2 line feeds. Parsed with the client parse mode.

    solutionEntities?: TypeMessageEntity[]

    Formatting entities for solution. When provided, parsing is skipped.

    solutionMedia?: TypeInputMedia

    Optional media attachment shown alongside the quiz solution explanation.

    subscribersOnly?: boolean

    Whether only subscribers can vote: a user may vote only while currently a member of the channel/supergroup.