Skip to content

Commit 84012c4

Browse files
Added the field first_profile_audio to the class ChatFullInfo.
1 parent 283278a commit 84012c4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

telebot/types.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,9 @@ class ChatFullInfo(JsonDeserializable):
760760

761761
:param paid_message_star_count: Optional. The number of Telegram Stars a general user have to pay to send a message to the chat
762762
:type paid_message_star_count: :obj:`int`
763+
764+
:param first_profile_audio: Optional. For private chats, the first audio added to the profile of the user
765+
:type first_profile_audio: :class:`telebot.types.Audio`
763766

764767
:param unique_gift_colors: Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews
765768
:type unique_gift_colors: :class:`telebot.types.UniqueGiftColors`
@@ -799,6 +802,8 @@ def de_json(cls, json_string):
799802
obj['rating'] = UserRating.de_json(obj['rating'])
800803
if 'unique_gift_colors' in obj:
801804
obj['unique_gift_colors'] = UniqueGiftColors.de_json(obj['unique_gift_colors'])
805+
if 'first_profile_audio' in obj:
806+
obj['first_profile_audio'] = Audio.de_json(obj['first_profile_audio'])
802807
return cls(**obj)
803808

804809
def __init__(self, id, type, title=None, username=None, first_name=None,
@@ -816,7 +821,7 @@ def __init__(self, id, type, title=None, username=None, first_name=None,
816821
business_opening_hours=None, personal_chat=None, birthdate=None,
817822
can_send_paid_media=None,
818823
accepted_gift_types=None, is_direct_messages=None, parent_chat=None, rating=None, paid_message_star_count=None,
819-
unique_gift_colors=None, **kwargs):
824+
unique_gift_colors=None, first_profile_audio=None, **kwargs):
820825
self.id: int = id
821826
self.type: str = type
822827
self.title: Optional[str] = title
@@ -867,6 +872,7 @@ def __init__(self, id, type, title=None, username=None, first_name=None,
867872
self.rating: Optional[UserRating] = rating
868873
self.paid_message_star_count: Optional[int] = paid_message_star_count
869874
self.unique_gift_colors: Optional[UniqueGiftColors] = unique_gift_colors
875+
self.first_profile_audio: Optional[Audio] = first_profile_audio
870876

871877

872878
@property
@@ -2228,7 +2234,7 @@ def __init__(self, file_id, file_unique_id, width, height, duration, thumbnail=N
22282234
self.cover: Optional[List[PhotoSize]] = cover
22292235
self.start_timestamp: Optional[int] = start_timestamp
22302236
self.qualities: Optional[List[VideoQuality]] = qualities
2231-
2237+
22322238
@property
22332239
def thumb(self) -> Optional[PhotoSize]:
22342240
log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')

0 commit comments

Comments
 (0)