@@ -8889,6 +8889,10 @@ def de_json(cls, json_string):
88898889 obj['poll'] = Poll.de_json(obj['poll'])
88908890 if 'venue' in obj:
88918891 obj['venue'] = Venue.de_json(obj['venue'])
8892+ if 'paid_media' in obj:
8893+ obj['paid_media'] = PaidMediaInfo.de_json(obj['paid_media'])
8894+ if 'checklist' in obj:
8895+ obj['checklist'] = Checklist.de_json(obj['checklist'])
88928896 return cls(**obj)
88938897
88948898 def __init__(
@@ -12523,7 +12527,7 @@ def de_json(cls, json_string):
1252312527 if json_string is None: return None
1252412528 obj = cls.check_json(json_string)
1252512529 if 'text_entities' in obj:
12526- obj['text_entities'] = [MessageEntity.de_json(entity) for entity in obj['text_entities']]
12530+ obj['text_entities'] = Message.parse_entities( obj['text_entities'])
1252712531 if 'completed_by_user' in obj:
1252812532 obj['completed_by_user'] = User.de_json(obj['completed_by_user'])
1252912533 return cls(**obj)
@@ -12552,8 +12556,8 @@ class Checklist(JsonDeserializable):
1255212556 :return: Instance of the class
1255312557 :rtype: :class:`Checklist`
1255412558 """
12555- def __init__(self, title: str, tasks: List[ChecklistTask],
12556- title_entities: Optional[ List[MessageEntity] ] = None,
12559+ def __init__(self, title: str,title_entities: Optional[ List[MessageEntity]] = None,
12560+ tasks: List[ChecklistTask ] = None,
1255712561 others_can_add_tasks: Optional[bool] = None,
1255812562 others_can_mark_tasks_as_done: Optional[bool] = None, **kwargs):
1255912563 self.title: str = title
@@ -12567,7 +12571,7 @@ def de_json(cls, json_string):
1256712571 if json_string is None: return None
1256812572 obj = cls.check_json(json_string)
1256912573 if 'title_entities' in obj:
12570- obj['title_entities'] = [MessageEntity.de_json(entity) for entity in obj['title_entities']]
12574+ obj['title_entities'] = Message.parse_entities( obj['title_entities'])
1257112575 if 'tasks' in obj:
1257212576 obj['tasks'] = [ChecklistTask.de_json(task) for task in obj['tasks']]
1257312577 return cls(**obj)
@@ -12608,9 +12612,9 @@ def to_dict(self):
1260812612 'id': self.id,
1260912613 'text': self.text
1261012614 }
12611- if self.parse_mode is not None :
12615+ if self.parse_mode:
1261212616 data['parse_mode'] = self.parse_mode
12613- if self.text_entities is not None :
12617+ if self.text_entities:
1261412618 data['text_entities'] = [entity.to_dict() for entity in self.text_entities]
1261512619 return data
1261612620
@@ -12641,10 +12645,9 @@ class InputChecklist(JsonSerializable):
1264112645 :return: Instance of the class
1264212646 :rtype: :class:`InputChecklist`
1264312647 """
12644- def __init__(self, title: str, tasks: List[InputChecklistTask],
12645- parse_mode: Optional[str] = None,
12648+ def __init__(self, title: str,parse_mode: Optional[str] = None,
1264612649 title_entities: Optional[List[MessageEntity]] = None,
12647- others_can_add_tasks: Optional[bool] = None,
12650+ tasks: List[InputChecklistTask], others_can_add_tasks: Optional[bool] = None,
1264812651 others_can_mark_tasks_as_done: Optional[bool] = None, **kwargs):
1264912652 self.title: str = title
1265012653 self.parse_mode: Optional[str] = parse_mode
@@ -12661,9 +12664,9 @@ def to_dict(self):
1266112664 'title': self.title,
1266212665 'tasks': [task.to_dict() for task in self.tasks]
1266312666 }
12664- if self.parse_mode is not None :
12667+ if self.parse_mode:
1266512668 data['parse_mode'] = self.parse_mode
12666- if self.title_entities is not None :
12669+ if self.title_entities:
1266712670 data['title_entities'] = [entity.to_dict() for entity in self.title_entities]
1266812671 if self.others_can_add_tasks is not None:
1266912672 data['others_can_add_tasks'] = self.others_can_add_tasks
0 commit comments