PollAnswer¶
- class telegram.PollAnswer(poll_id, option_ids, user=None, voter_chat=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObject
This object represents an answer of a user in a non-anonymous poll.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
poll_id
,user
andoption_ids
are equal.Available In
Changed in version 20.5: The order of
option_ids
anduser
is changed in 20.5 as the latter one became optional.Changed in version 20.6: Backward compatiblity for changed order of
option_ids
anduser
was removed.- Parameters:
option_ids (Sequence[
int
]) –Identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
Changed in version 20.0: Accepts any
collections.abc.Sequence
as input instead of just a list. The input is converted to a tuple.user (
telegram.User
, optional) –The user that changed the answer to the poll, if the voter isn’t anonymous. If the voter is anonymous, this field will contain the user
136817688
for backwards compatibility.Changed in version 20.5:
user
became optional.voter_chat (
telegram.Chat
, optional) –The chat that changed the answer to the poll, if the voter is anonymous.
Added in version 20.5.
- option_ids[source]¶
Identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
Changed in version 20.0: This attribute is now an immutable tuple.
- Type:
tuple[
int
]
- user[source]¶
Optional. The user, who changed the answer to the poll, if the voter isn’t anonymous. If the voter is anonymous, this field will contain the user
136817688
for backwards compatibilityChanged in version 20.5:
user
became optional.- Type:
- voter_chat[source]¶
Optional. The chat that changed the answer to the poll, if the voter is anonymous.
Added in version 20.5.
- Type: