From f2ebe880dc0d55e48056d45d4b8f3adcc91acf31 Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Mon, 6 May 2024 16:51:05 +0200 Subject: [PATCH] pyrofork: Added the max_reaction_count to the Chat Signed-off-by: wulan17 --- pyrogram/types/user_and_chats/chat.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 05a0d2a7..34c1a4af 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -191,6 +191,9 @@ class Chat(Object): personal_chat (:obj:`~pyrogram.types.Chat`, *optional*): For private chats, the personal channel of the user. Returned only in :meth:`~pyrogram.Client.get_chat`. + + max_reaction_count (``int``): + The maximum number of reactions that can be set on a message in the chat """ def __init__( @@ -240,7 +243,8 @@ class Chat(Object): profile_color: "types.ChatColor" = None, business_info: "types.BusinessInfo" = None, birthday: "types.Birthday" = None, - personal_chat: "types.Chat" = None + personal_chat: "types.Chat" = None, + max_reaction_count: int = None ): super().__init__(client) @@ -519,6 +523,7 @@ class Chat(Object): client, full_chat.available_reactions ) + parsed_chat.max_reaction_count = getattr(full_chat, "reactions_limit", 11) return parsed_chat