Poll#
- class pyrogram.raw.types.Poll#
Poll
Constructor of
Poll.- Details:
Layer:
227ID:
966E2DBF
- Parameters:
id (
int64-bit) – ID of the pollquestion (
TextWithEntities) – The question of the poll (only Premium users can use custom emoji entities here).answers (List of
PollAnswer) – The possible answers (2-poll_answers_max), vote using messages.sendVote.hash (
int64-bit) – Hash for use with messages.getPollResultsclosed (
bool, optional) – Whether the poll is closed and doesn’t accept any more answerspublic_voters (
bool, optional) – Whether cast votes are publicly visible to all users (non-anonymous poll)multiple_choice (
bool, optional) – Whether multiple options can be chosen as answerquiz (
bool, optional) – Whether this is a quiz (with wrong and correct answers, results shown in the return type). When creating a poll, the correct answers are specified in inputMediaPoll.correct_answers.open_answers (
bool, optional) – Whether users can add new answer options after the poll is created, see open-answer polls »revoting_disabled (
bool, optional) – If set, users cannot change their vote after casting itshuffle_answers (
bool, optional) – Whether answer options are displayed in a randomized order to each userhide_results_until_close (
bool, optional) – Whether vote results are hidden from all participants until the poll is closedcreator (
bool, optional) – Whether the current user created this pollsubscribers_only (
bool, optional) – Whether only subscribers can vote: a user may vote only if they are currently a member of the channel/supergroup and joined it at least 24 hours before the poll was posted, see subscriber-only polls ».close_period (
int32-bit, optional) – Amount of time in seconds the poll will be active after creation, up to poll_close_period_max » seconds. Can’t be used together with close_date.close_date (
int32-bit, optional) – Point in time (Unix timestamp) when the poll will be automatically closed. Up to poll_close_period_max » seconds in the future; can’t be used together with close_period.countries_iso2 (List of
str, optional) – If set, only users from the specified ISO 3166-1 alpha-2 country codes may vote, see country-restricted polls »; a user may vote only if the phone_country_iso2 » configuration parameter is contained in this list.