L idZddlmZmZmZmZmZddlmZddl m Z ddl m Z ddl mZddlmZerddlmZGd d e ZGd d eZGd deZGddeZGdde Zy)zEThis module contains objects that represents a Telegram ReactionType.) TYPE_CHECKINGFinalLiteralOptionalUnion) constants)TelegramObject)enum)de_json_optional)JSONDict)BotceZdZUdZdZej jZeej e d< ej jZ eej e d< ej jZ eej e d< ddde e d ej fd eeffd Zedd ed edddffd ZxZS) ReactionTypeaBase class for Telegram ReactionType Objects. There exist :class:`telegram.ReactionTypeEmoji`, :class:`telegram.ReactionTypeCustomEmoji` and :class:`telegram.ReactionTypePaid`. .. versionadded:: 20.8 .. versionchanged:: 21.5 Added paid reaction. Args: type (:obj:`str`): Type of the reaction. Can be :attr:`~telegram.ReactionType.EMOJI`, :attr:`~telegram.ReactionType.CUSTOM_EMOJI` or :attr:`~telegram.ReactionType.PAID`. Attributes: type (:obj:`str`): Type of the reaction. Can be :attr:`~telegram.ReactionType.EMOJI`, :attr:`~telegram.ReactionType.CUSTOM_EMOJI` or :attr:`~telegram.ReactionType.PAID`. )typeEMOJI CUSTOM_EMOJIPAIDN api_kwargsr)emoji custom_emojipaidrct||tjtj |||_|jyNr)super__init__r get_memberrrr_freeze)selfrr __class__s X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_reaction.pyrzReactionType.__init__Bs8 J/)?)?tL  databotr returnc*|j|}|jt|jt|j t i}|tur7|jd|vr$||jdj||St|)||Sz,See :meth:`telegram.TelegramObject.de_json`.r)r#r$) _parse_datarReactionTypeEmojirReactionTypeCustomEmojirReactionTypePaidrgetpopde_jsonr)clsr#r$_class_mappingr s r!r.zReactionType.de_jsonPst$ II(   5 HH&9  , 488F#3~#E!$((6"23;;D#F FwDc22r"N)__name__ __module__ __qualname____doc__ __slots__rrrr__annotations__rrrrrr r classmethodr. __classcell__r s@r!rr!s(I+4+A+A+G+GE5'' (G82;2H2H2U2UL% ../U?*3*@*@*E*ED% && 'E*.  3 4i6L6L L   X&  38 3(5/ 3^ 3 3r"rc<eZdZdZdZdddedeeffdZxZ S)r)aP Represents a reaction with a normal emoji. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if the :attr:`emoji` is equal. .. versionadded:: 20.8 Args: emoji (:obj:`str`): Reaction emoji. It can be one of :const:`telegram.constants.ReactionEmoji`. Attributes: type (:obj:`str`): Type of the reaction, always :tg-const:`telegram.ReactionType.EMOJI`. emoji (:obj:`str`): Reaction emoji. It can be one of :const:`telegram.constants.ReactionEmoji`. )rNrrrct|tj||j 5||_|j f|_dddy#1swYyxYwN)rr)rrrr _unfrozenr _id_attrs)rrrr s r!rzReactionTypeEmoji.__init__wsP l00ZH ^^  +#DJ"jj]DN + + + AA r2r3r4r5r6strrr rr9r:s@r!r)r)as5&I *. + +X& + +r"r)c<eZdZdZdZdddedeeffdZxZ S)r*a Represents a reaction with a custom emoji. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if the :attr:`custom_emoji_id` is equal. .. versionadded:: 20.8 Args: custom_emoji_id (:obj:`str`): Custom emoji identifier. Attributes: type (:obj:`str`): Type of the reaction, always :tg-const:`telegram.ReactionType.CUSTOM_EMOJI`. custom_emoji_id (:obj:`str`): Custom emoji identifier. )custom_emoji_idNrrDrct|tj||j 5||_|j f|_dddy#1swYyxYwr=)rrrrr>rDr?)rrDrr s r!rz ReactionTypeCustomEmoji.__init__sT l77JO ^^  5(7D "224DN 5 5 5r@rAr:s@r!r*r*s5$%I *. 5 5X& 5 5r"r*c8eZdZdZdZdddeeffdZxZS)r+z The reaction is paid. .. versionadded:: 21.5 Attributes: type (:obj:`str`): Type of the reaction, always :tg-const:`telegram.ReactionType.PAID`. Nrrcdt|tj||j yr=)rrrrr)rrr s r!rzReactionTypePaid.__init__s$ l//JG r") r2r3r4r5r6rr rr9r:s@r!r+r+s(I;?hx&8r"r+cjeZdZdZdZdddededeeffdZ e dd ed ed d dffd Z xZ S) ReactionCountaiThis class represents a reaction added to a message along with the number of times it was added. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if the :attr:`type` and :attr:`total_count` is equal. .. versionadded:: 20.8 Args: type (:class:`telegram.ReactionType`): Type of the reaction. total_count (:obj:`int`): Number of times the reaction was added. Attributes: type (:class:`telegram.ReactionType`): Type of the reaction. total_count (:obj:`int`): Number of times the reaction was added. ) total_countrNrrrKrct||||_||_|j|jf|_|j yr)rrrrKr?r)rrrKrr s r!rzReactionCount.__init__sJ J/"& + II     r"r#r$r r%c|j|}t|jdt||d<t|||Sr')r(r r,rrr.)r/r#r$r s r!r.zReactionCount.de_jsonsAt$'(8,LV wDc22r"r1) r2r3r4r5r6rintrr rr8r.r9r:s@r!rJrJsg"I*.  X& $383(5/3_33r"rJN)r5typingrrrrrtelegramrtelegram._telegramobjectr telegram._utilsr telegram._utils.argumentparsingr telegram._utils.typesr r rr)r*r+rJrGr"r!rUse&LAA3 <*=3>=3@ + +F5l5D|$03N03r"