Skip to content

Commit f5477d7

Browse files
Added the field sender_boost_count to the class Message.
1 parent 0e125ab commit f5477d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

telebot/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,9 @@ class Message(JsonDeserializable):
805805
fake sender user in non-channel chats, if the message was sent on behalf of a chat.
806806
:type sender_chat: :class:`telebot.types.Chat`
807807
808+
:param sender_boost_count: Optional. If the sender of the message boosted the chat, the number of boosts added by the user
809+
:type sender_boost_count: :obj:`int`
810+
808811
:param date: Date the message was sent in Unix time
809812
:type date: :obj:`int`
810813
@@ -1281,6 +1284,8 @@ def de_json(cls, json_string):
12811284
if 'boost_added' in obj:
12821285
opts['boost_added'] = ChatBoostAdded.de_json(obj['boost_added'])
12831286
content_type = 'boost_added'
1287+
if 'sender_boost_count' in obj:
1288+
opts['sender_boost_count'] = obj['sender_boost_count']
12841289

12851290

12861291
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
@@ -1383,6 +1388,7 @@ def __init__(self, message_id, from_user, date, chat, content_type, options, jso
13831388
self.giveaway_completed: Optional[GiveawayCompleted] = None
13841389
self.forward_origin: Optional[MessageOrigin] = None
13851390
self.boost_added: Optional[ChatBoostAdded] = None
1391+
self.sender_boost_count: Optional[int] = None
13861392

13871393
for key in options:
13881394
setattr(self, key, options[key])

0 commit comments

Comments
 (0)