diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 1eac9b33..c29a2741 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -76,6 +76,10 @@ class Chat(Object): True, if Aggressive Anti-Spam is enabled in chat. Returned only in :meth:`~pyrogram.Client.get_chat`. + is_paid_reactions_available (``bool``, *optional*): + True, if paid reactions are available in chat. + Returned only in :meth:`~pyrogram.Client.get_chat`. + title (``str``, *optional*): Title, for supergroups, channels and basic group chats. @@ -198,6 +202,10 @@ class Chat(Object): max_reaction_count (``int``): The maximum number of reactions that can be set on a message in the chat + + subscription_until_date (:py:obj:`~datetime.datetime`, *optional*): + Date when the subscription expires. + Returned only in :meth:`~pyrogram.Client.get_chat`. """ def __init__( @@ -217,6 +225,7 @@ def __init__( is_join_request: bool = None, is_join_to_send: bool = None, is_antispam: bool = None, + is_paid_reactions_available: bool = None, is_slowmode_enabled: bool = None, title: str = None, username: str = None, @@ -249,7 +258,8 @@ def __init__( business_info: "types.BusinessInfo" = None, birthday: "types.Birthday" = None, personal_chat: "types.Chat" = None, - max_reaction_count: int = None + max_reaction_count: int = None, + subscription_until_date: datetime = None ): super().__init__(client) @@ -266,6 +276,7 @@ def __init__( self.is_join_request = is_join_request self.is_join_to_send = is_join_to_send self.is_antispam = is_antispam + self.is_paid_reactions_available = is_paid_reactions_available self.is_slowmode_enabled = is_slowmode_enabled self.title = title self.username = username @@ -298,6 +309,7 @@ def __init__( self.business_info = business_info self.birthday = birthday self.personal_chat = personal_chat + self.subscription_until_date = subscription_until_date @property def full_name(self) -> str: @@ -488,7 +500,9 @@ async def _parse_full(client, chat_full: Union[raw.types.messages.ChatFull, raw. parsed_chat.sticker_set_name = getattr(full_chat.stickerset, "short_name", None) parsed_chat.is_participants_hidden = full_chat.participants_hidden parsed_chat.is_antispam = full_chat.antispam + parsed_chat.is_paid_reactions_available = full_chat.paid_reactions_available parsed_chat.folder_id = getattr(full_chat, "folder_id", None) + parsed_chat.subscription_until_date = utils.get_datetime(getattr(full_chat, "subscription_until_date", None)) linked_chat_raw = chats.get(full_chat.linked_chat_id, None)