import { TelegramMessageEntity, TelegramPoll, TelegramPollOption } from '../../../types'; import { Context } from '../../core'; export declare class PollContext extends Context { /** Gets the ID of the poll. */ id: string; /** Gets the question text of the poll. */ question: string; /** Gets the list of poll options. */ options: TelegramPollOption[]; /** Gets the total number of users that voted in the poll. */ totalVoterCount: number; /** Returns true if the poll is closed. */ isClosed: boolean; /** Returns true if the poll is anonymous. */ isAnonymous: boolean; /** Gets the type of the poll. */ type: string; /** Returns true if the poll allows multiple answers. */ allowsMultipleAnswers: boolean; /** Gets the ID of the correct answer option, if specified. */ correctOptionId: number | undefined; /** Gets the text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, if specified. */ explanation: string | undefined; /** Gets the entities that appear in the explanation text, if specified. */ explanationEntities: TelegramMessageEntity | undefined; /** Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions */ questionEntities: TelegramMessageEntity | undefined; /** Gets the amount of time in seconds the poll will be active after creation, if specified. */ openPeriod: number | undefined; /** * This method searches for a poll option with the given text among all the options in the poll. * @param text Parameter specifies the text to search for. * @returns The found poll option. */ getPollOptionByText(text: string): TelegramPollOption | undefined; /** * Returns the percentage of votes for the transmitted option * @param option Poll option from which to calculate the percentage * @returns Percentage of those who voted for option */ getPollOptionPercentage(option: TelegramPollOption): number; }