Skip to content

Commit 22b008d

Browse files
Added the field persistent_id to the class PollOption, representing a persistent identifier for the option.
1 parent 78a42f5 commit 22b008d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

telebot/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7425,6 +7425,9 @@ class PollOption(JsonDeserializable):
74257425

74267426
Telegram Documentation: https://core.telegram.org/bots/api#polloption
74277427

7428+
:param persistent_id: Unique identifier of the option, persistent on option addition and deletion
7429+
:type persistent_id: :obj:`str`
7430+
74287431
:param text: Option text, 1-100 characters
74297432
:type text: :obj:`str`
74307433

@@ -7445,8 +7448,9 @@ def de_json(cls, json_string):
74457448
obj['text_entities'] = Message.parse_entities(obj['text_entities'])
74467449
return cls(**obj)
74477450

7448-
def __init__(self, text, voter_count = 0, text_entities=None, **kwargs):
7451+
def __init__(self, text, persistent_id, voter_count = 0, text_entities=None, **kwargs):
74497452
self.text: str = text
7453+
self.persistent_id: str = persistent_id
74507454
self.voter_count: int = voter_count
74517455
self.text_entities: Optional[List[MessageEntity]] = text_entities
74527456
# Converted in _convert_poll_options

0 commit comments

Comments
 (0)