From 7a78076e6e40e428f01d6d2044aa92f1e3842642 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Sat, 6 Apr 2024 20:35:25 +0700 Subject: [PATCH] Pyrofork: Add is_bot_business field to class User Signed-off-by: wulan17 --- pyrogram/types/user_and_chats/user.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyrogram/types/user_and_chats/user.py b/pyrogram/types/user_and_chats/user.py index 293eb7ff7..752d3089a 100644 --- a/pyrogram/types/user_and_chats/user.py +++ b/pyrogram/types/user_and_chats/user.py @@ -104,6 +104,9 @@ class User(Object, Update): is_contacts_only (``bool``, *optional*): True, if this user is only allow incoming message from users in their contacts/premium users. + is_bot_business (``bool``, *optional*): + True, if this bot can connect to business. + first_name (``str``, *optional*): User's or bot's first name. @@ -181,6 +184,7 @@ def __init__( is_support: bool = None, is_premium: bool = None, is_contacts_only: bool = None, + is_bot_business: bool = None, first_name: str = None, last_name: str = None, status: "enums.UserStatus" = None, @@ -212,6 +216,7 @@ def __init__( self.is_support = is_support self.is_premium = is_premium self.is_contacts_only = is_contacts_only + self.is_bot_business = is_bot_business self.first_name = first_name self.last_name = last_name self.status = status @@ -272,6 +277,7 @@ def _parse(client, user: "raw.base.User") -> Optional["User"]: is_support=user.support, is_premium=user.premium, is_contacts_only=user.contact_require_premium, + is_bot_business=user.bot_business, first_name=user.first_name, last_name=user.last_name, **User._parse_status(user.status, user.bot),