Skip to content

Commit

Permalink
Add sender_boost_count attribute to Message class
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Mar 18, 2024
1 parent c5d6028 commit 812c397
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ class Message(Object, Update):
forwards (``int``, *optional*):
Channel post forwards.
sender_boost_count (``int``, *optional*):
The number of boosts applied by the sender.
via_bot (:obj:`~pyrogram.types.User`):
The information of the bot that generated the message from an inline query of a user.
Expand Down Expand Up @@ -459,6 +462,7 @@ def __init__(
game_high_score: int = None,
views: int = None,
forwards: int = None,
sender_boost_count: int = None,
via_bot: "types.User" = None,
outgoing: bool = None,
quote: bool = None,
Expand Down Expand Up @@ -561,6 +565,7 @@ def __init__(
self.game_high_score = game_high_score
self.views = views
self.forwards = forwards
self.sender_boost_count = sender_boost_count
self.via_bot = via_bot
self.outgoing = outgoing
self.quote = quote
Expand Down Expand Up @@ -1049,6 +1054,7 @@ async def _parse(
dice=dice,
views=message.views,
forwards=message.forwards,
sender_boost_count=getattr(message, "from_boosts_applied", None),
via_bot=types.User._parse(client, users.get(message.via_bot_id, None)),
outgoing=message.out,
reply_markup=reply_markup,
Expand Down

0 comments on commit 812c397

Please sign in to comment.