L in&dZddlZddlmZmZmZddlmZddl m Z ddl m Z ddl mZddlmZdd lmZmZdd lmZerdd lmZGd d e ZGddeZGddeZGddeZGddeZGddeZGddeZy)zEThis module contains an object that represents a Telegram ChatMember.N) TYPE_CHECKINGFinalOptional) constants)TelegramObject)User)enum)de_json_optional)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)BotceZdZUdZdZej jZee e d< ej jZ ee e d< ej jZ ee e d< ej jZ ee e d< ej jZee e d< ej jZee e d< d d d ed e d eeffdZeddededddffd ZxZS) ChatMemberaBase class for Telegram ChatMember Objects. Currently, the following 6 types of chat members are supported: * :class:`telegram.ChatMemberOwner` * :class:`telegram.ChatMemberAdministrator` * :class:`telegram.ChatMemberMember` * :class:`telegram.ChatMemberRestricted` * :class:`telegram.ChatMemberLeft` * :class:`telegram.ChatMemberBanned` Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`user` and :attr:`status` are equal. Examples: :any:`Chat Member Bot ` .. versionchanged:: 20.0 * As of Bot API 5.3, :class:`ChatMember` is nothing but the base class for the subclasses listed above and is no longer returned directly by :meth:`~telegram.Bot.get_chat`. Therefore, most of the arguments and attributes were removed and you should no longer use :class:`ChatMember` directly. * The constant ``ChatMember.CREATOR`` was replaced by :attr:`~telegram.ChatMember.OWNER` * The constant ``ChatMember.KICKED`` was replaced by :attr:`~telegram.ChatMember.BANNED` Args: user (:class:`telegram.User`): Information about the user. status (:obj:`str`): The member's status in the chat. Can be :attr:`~telegram.ChatMember.ADMINISTRATOR`, :attr:`~telegram.ChatMember.OWNER`, :attr:`~telegram.ChatMember.BANNED`, :attr:`~telegram.ChatMember.LEFT`, :attr:`~telegram.ChatMember.MEMBER` or :attr:`~telegram.ChatMember.RESTRICTED`. Attributes: user (:class:`telegram.User`): Information about the user. status (:obj:`str`): The member's status in the chat. Can be :attr:`~telegram.ChatMember.ADMINISTRATOR`, :attr:`~telegram.ChatMember.OWNER`, :attr:`~telegram.ChatMember.BANNED`, :attr:`~telegram.ChatMember.LEFT`, :attr:`~telegram.ChatMember.MEMBER` or :attr:`~telegram.ChatMember.RESTRICTED`. )statususer ADMINISTRATOROWNERBANNEDLEFTMEMBER RESTRICTEDN api_kwargsrrrct||||_tjt j |||_|j|jf|_|jy)Nr) super__init__rr get_memberrChatMemberStatusr _id_attrs_freeze)selfrrr __class__s Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_chatmember.pyrzChatMember.__init__]sS J/ ??9+E+EvvV ))T[[1 databotrreturnc |j|}|jt|jt|j t |jt|jt|jti}|tur8|jd|vr%||jdj!||St#|jdt$||d<d|vr*t'|}t)|jd||d<|tur6|jd%d|jdi}t*|Y|||St*|A||S)z,See :meth:`telegram.TelegramObject.de_json`.r)r&r'r until_date)tzinfocan_send_media_messages)r&r'r) _parse_datarChatMemberOwnerrChatMemberAdministratorrChatMemberMemberrChatMemberRestrictedrChatMemberLeftrChatMemberBannedrgetpopde_jsonr rr r r_de_json)clsr&r'_class_mapping loc_tzinforr#s r$r6zChatMember.de_jsonms5t$ II   6 JJ( NN0 HHn JJ( 7  * (!3~!E!$((8"45==4S=Q Q'(8$DV 4 5c:J!/0Fz!ZD  & &4884M+N+Z3TXX>W5XYJ7#3:#N NwDc22r%N)__name__ __module__ __qualname____doc__ __slots__rrrrstr__annotations__rrrrrrrr r classmethodr6 __classcell__r#s@r$rr$s'R#I ) : : H HM5:HD!2288E5:8<"33::FE#J:= 1166D%*6;"33::FE#J:=&77BBJc BA*.  X&  383(5/3\33r%rc NeZdZdZdZ d dddededeedee ffd Z xZ S) r.a  Represents a chat member that owns the chat and has all administrator privileges. .. versionadded:: 13.7 Args: user (:class:`telegram.User`): Information about the user. is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden. custom_title (:obj:`str`, optional): Custom title for this user. Attributes: status (:obj:`str`): The member's status in the chat, always :tg-const:`telegram.ChatMember.OWNER`. user (:class:`telegram.User`): Information about the user. is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden. custom_title (:obj:`str`): Optional. Custom title for this user. ) custom_title is_anonymousNrrrHrGrct|tj|||j 5||_||_dddy#1swYyxYwN)rrr)rrrr _unfrozenrHrG)r"rrHrGrr#s r$rzChatMemberOwner.__init__sN  0 0t S ^^  <&2D /;D  < < r?r@rboolrrAr rrDrEs@r$r.r.sW,1I '+ < *. < < <sm < X& <