diff --git a/telebot/types.py b/telebot/types.py index 13811ffe7..df8af2921 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -760,7 +760,7 @@ class ChatFullInfo(JsonDeserializable): :param paid_message_star_count: Optional. The number of Telegram Stars a general user have to pay to send a message to the chat :type paid_message_star_count: :obj:`int` - + :param first_profile_audio: Optional. For private chats, the first audio added to the profile of the user :type first_profile_audio: :class:`telebot.types.Audio` @@ -13195,6 +13195,14 @@ def __init__(self, model_custom_emoji_id: str, symbol_custom_emoji_id: str, self.light_theme_other_colors: List[int] = light_theme_other_colors self.dark_theme_main_color: int = dark_theme_main_color self.dark_theme_other_colors: List[int] = dark_theme_other_colors + + @classmethod + def de_json(cls, json_string): + if json_string is None: return None + obj = cls.check_json(json_string) + return cls(**obj) + + class DirectMessagesTopic(JsonDeserializable): """ Describes a topic of a direct messages chat. @@ -13555,7 +13563,7 @@ class ChatOwnerLeft(JsonDeserializable): """ def __init__(self, new_owner: Optional[User] = None, **kwargs): self.new_owner: Optional[User] = new_owner - + @classmethod def de_json(cls, json_string): if json_string is None: return None @@ -13563,7 +13571,7 @@ def de_json(cls, json_string): if 'new_owner' in obj: obj['new_owner'] = User.de_json(obj['new_owner']) return cls(**obj) - + class ChatOwnerChanged(JsonDeserializable): """ Describes a service message about an ownership change in the chat. @@ -13585,7 +13593,7 @@ def de_json(cls, json_string): obj = cls.check_json(json_string) obj['new_owner'] = User.de_json(obj['new_owner']) return cls(**obj) - + class VideoQuality(JsonDeserializable): """ This object represents a video file of a specific quality. @@ -13627,7 +13635,7 @@ def de_json(cls, json_string): if json_string is None: return None obj = cls.check_json(json_string) return cls(**obj) - + class UserProfileAudios(JsonDeserializable): """ @@ -13654,4 +13662,3 @@ def de_json(cls, json_string): obj = cls.check_json(json_string) obj['audios'] = [Audio.de_json(audio) for audio in obj['audios']] return cls(**obj) -