@@ -7648,6 +7648,9 @@ class PollAnswer(JsonSerializable, JsonDeserializable, Dictionaryable):
76487648 :param option_ids: 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote.
76497649 :type option_ids: :obj:`list` of :obj:`int`
76507650
7651+ :param option_persistent_ids: Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.
7652+ :type option_persistent_ids: :obj:`list` of :obj:`str`
7653+
76517654 :return: Instance of the class
76527655 :rtype: :class:`telebot.types.PollAnswer`
76537656 """
@@ -7661,10 +7664,12 @@ def de_json(cls, json_string):
76617664 obj['voter_chat'] = Chat.de_json(obj['voter_chat'])
76627665 return cls(**obj)
76637666
7664- def __init__(self, poll_id: str, option_ids: List[int], user: Optional[User] = None, voter_chat: Optional[Chat] = None, **kwargs):
7667+ def __init__(self, poll_id: str, option_ids: List[int], option_persistent_ids: List[str],
7668+ user: Optional[User] = None, voter_chat: Optional[Chat] = None, **kwargs):
76657669 self.poll_id: str = poll_id
76667670 self.user: Optional[User] = user
76677671 self.option_ids: List[int] = option_ids
7672+ self.option_persistent_ids: List[str] = option_persistent_ids
76687673 self.voter_chat: Optional[Chat] = voter_chat
76697674
76707675
@@ -7675,7 +7680,8 @@ def to_dict(self):
76757680 # Left for backward compatibility, but with no support for voter_chat
76767681 json_dict = {
76777682 "poll_id": self.poll_id,
7678- "option_ids": self.option_ids
7683+ "option_ids": self.option_ids,
7684+ "option_persistent_ids": self.option_persistent_ids
76797685 }
76807686 if self.user:
76817687 json_dict["user"] = self.user.to_dict()
0 commit comments