L i[dZddlmZddlmZmZmZddlmZddl m Z ddl m Z ddl mZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9m:Z:m;Z;ddlm?Z?m@Z@erddlAmBZBGd d!e7ZCGd"d#e7ZDGd$d%e7ZEy&)'z>This modules contains objects that represents Telegram Replies)Sequence) TYPE_CHECKINGOptionalUnion)Chat) Checklist)Dice) Animation)Audio)Contact)Document)Location) PhotoSize)Sticker)Venue)Video) VideoNote)Voice)Game)GiveawayGiveawayWinners)LinkPreviewOptions) MessageEntity) MessageOrigin) PaidMediaInfo)Invoice)Poll)Story)TelegramObject)de_json_optionalde_list_optionalparse_sequence_arg) DEFAULT_NONE)JSONDictODVInput)Botc7eZdZdZdZ d%dddedeedeedee d ee d ee d ee d ee ed eedeedeedeedeedeedeedeedeedeedeedeedeedeedeedeedeedee f4fdZ!e"d&d e d!ed"d#dffd$ Z#xZ$S)'ExternalReplyInfoaS This object contains information about a message that is being replied to, which may come from another chat or forum topic. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`origin` is equal. .. versionadded:: 20.8 Args: origin (:class:`telegram.MessageOrigin`): Origin of the message replied to by the given message. chat (:class:`telegram.Chat`, optional): Chat the original message belongs to. Available only if the chat is a supergroup or a channel. message_id (:obj:`int`, optional): Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel. link_preview_options (:class:`telegram.LinkPreviewOptions`, optional): Options used for link preview generation for the original message, if it is a text message animation (:class:`telegram.Animation`, optional): Message is an animation, information about the animation. audio (:class:`telegram.Audio`, optional): Message is an audio file, information about the file. document (:class:`telegram.Document`, optional): Message is a general file, information about the file. photo (Sequence[:class:`telegram.PhotoSize`], optional): Message is a photo, available sizes of the photo. sticker (:class:`telegram.Sticker`, optional): Message is a sticker, information about the sticker. story (:class:`telegram.Story`, optional): Message is a forwarded story. video (:class:`telegram.Video`, optional): Message is a video, information about the video. video_note (:class:`telegram.VideoNote`, optional): Message is a `video note `_, information about the video message. voice (:class:`telegram.Voice`, optional): Message is a voice message, information about the file. has_media_spoiler (:obj:`bool`, optional): :obj:`True`, if the message media is covered by a spoiler animation. checklist (:class:`telegram.Checklist`, optional): Message is a checklist. .. versionadded:: 22.3 contact (:class:`telegram.Contact`, optional): Message is a shared contact, information about the contact. dice (:class:`telegram.Dice`, optional): Message is a dice with random value. game (:Class:`telegram.Game`. optional): Message is a game, information about the game. :ref:`More about games >> `. giveaway (:class:`telegram.Giveaway`, optional): Message is a scheduled giveaway, information about the giveaway. giveaway_winners (:class:`telegram.GiveawayWinners`, optional): A giveaway with public winners was completed. invoice (:class:`telegram.Invoice`, optional): Message is an invoice for a payment, information about the invoice. :ref:`More about payments >> `. location (:class:`telegram.Location`, optional): Message is a shared location, information about the location. poll (:class:`telegram.Poll`, optional): Message is a native poll, information about the poll. venue (:class:`telegram.Venue`, optional): Message is a venue, information about the venue. paid_media (:class:`telegram.PaidMedia`, optional): Message contains paid media; information about the paid media. .. versionadded:: 21.4 Attributes: origin (:class:`telegram.MessageOrigin`): Origin of the message replied to by the given message. chat (:class:`telegram.Chat`): Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel. message_id (:obj:`int`): Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel. link_preview_options (:class:`telegram.LinkPreviewOptions`): Optional. Options used for link preview generation for the original message, if it is a text message. animation (:class:`telegram.Animation`): Optional. Message is an animation, information about the animation. audio (:class:`telegram.Audio`): Optional. Message is an audio file, information about the file. document (:class:`telegram.Document`): Optional. Message is a general file, information about the file. photo (tuple[:class:`telegram.PhotoSize`]): Optional. Message is a photo, available sizes of the photo. sticker (:class:`telegram.Sticker`): Optional. Message is a sticker, information about the sticker. story (:class:`telegram.Story`): Optional. Message is a forwarded story. video (:class:`telegram.Video`): Optional. Message is a video, information about the video. video_note (:class:`telegram.VideoNote`): Optional. Message is a `video note `_, information about the video message. voice (:class:`telegram.Voice`): Optional. Message is a voice message, information about the file. has_media_spoiler (:obj:`bool`): Optional. :obj:`True`, if the message media is covered by a spoiler animation. checklist (:class:`telegram.Checklist`): Optional. Message is a checklist. .. versionadded:: 22.3 contact (:class:`telegram.Contact`): Optional. Message is a shared contact, information about the contact. dice (:class:`telegram.Dice`): Optional. Message is a dice with random value. game (:Class:`telegram.Game`): Optional. Message is a game, information about the game. :ref:`More about games >> `. giveaway (:class:`telegram.Giveaway`): Optional. Message is a scheduled giveaway, information about the giveaway. giveaway_winners (:class:`telegram.GiveawayWinners`): Optional. A giveaway with public winners was completed. invoice (:class:`telegram.Invoice`): Optional. Message is an invoice for a payment, information about the invoice. :ref:`More about payments >> `. location (:class:`telegram.Location`): Optional. Message is a shared location, information about the location. poll (:class:`telegram.Poll`): Optional. Message is a native poll, information about the poll. venue (:class:`telegram.Venue`): Optional. Message is a venue, information about the venue. paid_media (:class:`telegram.PaidMedia`): Optional. Message contains paid media; information about the paid media. .. versionadded:: 21.4 ) animationaudiochat checklistcontactdicedocumentgamegiveawaygiveaway_winnershas_media_spoilerinvoicelink_preview_optionslocation message_idorigin paid_mediaphotopollstickerstoryvenuevideo video_notevoiceN api_kwargsr8r+r7r5r)r*r/r:r<r=r?r@rAr3r-r.r0r1r2r4r6r;r>r9r,rCct||||_||_||_||_||_||_||_t||_ | |_ | |_ | |_ | |_| |_||_||_||_||_||_||_||_||_||_||_||_||_|jf|_|j;yNrB)super__init__r8r+r7r5r)r*r/r"r:r<r=r?r@rAr3r,r-r.r0r1r2r4r6r;r>r9 _id_attrs_freeze)selfr8r+r7r5r)r*r/r:r<r=r?r@rAr3r-r.r0r1r2r4r6r;r>r9r,rC __class__s U/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_reply.pyrGzExternalReplyInfo.__init__s< J/%+ $( )3BV!.7&+ ,4 6H6O *1 &+ &+ /9&+ 1B.7*1 $( $( ,4 ;K*1 ,4 $( &+ 3=++ databotr&returnc|j|}t|jdt||d<t|jdt||d<t|jdt ||d<t|jdt ||d<t|jdt||d<t|jdt||d<t|jdt||d<t|jdt||d<t|jd t||d <t|jd t||d <t|jd t||d <t|jd t||d <t|jd t ||d <t|jdt"||d<t|jdt$||d<t|jdt&||d<t|jdt(||d<t|jdt*||d<t|jdt,||d<t|jdt.||d<t|jdt0||d<t|jdt2||d<t|jdt4||d<t6|q||S),See :meth:`telegram.TelegramObject.de_json`.r8r+r5r)r*r/r:r<r=r?r@rAr-r.r0r1r2r4r6r;r>r9r,rNrO) _parse_datar getrrrr r r r!rrrrrrr r rrrrrrrrrrFde_jsonclsrNrOrKs rLrVzExternalReplyInfo.de_jsonst$)$((8*MY('):E3GW ('):E3GW -dhh|.DiQTU\('):E3GW *488I+>MY'(8$DV '(8$DV +DHHZ,@(CPZ#3 HH' (/3$   +488I+>MY+DHHZ,@(CPZ'(8$DV ('):E3GW -dhh|.DmUXY\,TXXk-BIsS[wDc22rM)NNNNNNNNNNNNNNNNNNNNNNNNN)%__name__ __module__ __qualname____doc__ __slots__rrrintrr r r rrrrrrrboolr r rrrrrrrrrr$rG classmethodrV __classcell__rKs@rLr(r(8spdI> $$(=A)-!%'+/3%)!%!%*.!%,0%)##'+6:%)'+#!%.2)-5<8*.9<<tn<SM < ''9: < I& <<8$<+,<'"<<<Y'<<$D>< '"!<"tn#<$tn%<&8$'<(#?3)<*'"+<,8$-<.tn/<01<2]+3<4I&5<8X&9<| 38 3(5/ 3EX 3 3rMr(c eZdZdZdZ ddddededeee dee d ee f fd Z e dd e d ed ddffd ZxZS) TextQuotea This object contains information about the quoted part of a message that is replied to by the given message. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`text` and :attr:`position` are equal. .. versionadded:: 20.8 Args: text (:obj:`str`): Text of the quoted part of a message that is replied to by the given message. position (:obj:`int`): Approximate quote position in the original message in UTF-16 code units as specified by the sender. entities (Sequence[:class:`telegram.MessageEntity`], optional): Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes. is_manual (:obj:`bool`, optional): :obj:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server. Attributes: text (:obj:`str`): Text of the quoted part of a message that is replied to by the given message. position (:obj:`int`): Approximate quote position in the original message in UTF-16 code units as specified by the sender. entities (tuple[:class:`telegram.MessageEntity`]): Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes. is_manual (:obj:`bool`): Optional. :obj:`True`, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server. )entities is_manualpositiontextNrBrirhrfrgrCct||||_||_t ||_||_|j|jf|_|jyrE) rFrGrirhr"rfrgrHrI)rJrirhrfrgrCrKs rLrGzTextQuote.__init__Rs[ J/ % =OPX=Y )2 II MM  rMrNrOr&rPc|j|}t|jdt||d<t|||S)rRrfrS)rTr!rUrrFrVrWs rLrVzTextQuote.de_jsonisCt$+DHHZ,@-QTUZwDc22rM)NNrY)rZr[r\r]r^strr_rrrr`r$rGrarVrbrcs@rLrere)sBI7;$( *.8M23  D> X&.383(5/3[33rMreceZdZdZdZdededddfdddedeeee fde e dee d e e d ee e d eed eed eeffdZeddededddffd ZxZS)ReplyParametersa+ Describes reply parameters for the message that is being sent. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`message_id` is equal. .. versionadded:: 20.8 .. versionchanged:: 22.5 The :paramref:`checklist_task_id` parameter has been moved to the last position to maintain backward compatibility with versions prior to 22.4. This resolves a breaking change accidentally introduced in version 22.4. See the changelog for version 22.5 for more information. Args: message_id (:obj:`int`): Identifier of the message that will be replied to in the current chat, or in the chat :paramref:`chat_id` if it is specified. chat_id (:obj:`int` | :obj:`str`, optional): If the message to be replied to is from a different chat, |chat_id_channel| Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply| Can be used only for replies in the same chat and forum topic. quote (:obj:`str`, optional): Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. quote_parse_mode (:obj:`str`, optional): Mode for parsing entities in the quote. See :wiki:`formatting options ` for more details. quote_entities (Sequence[:class:`telegram.MessageEntity`], optional): A JSON-serialized list of special entities that appear in the quote. It can be specified instead of :paramref:`quote_parse_mode`. quote_position (:obj:`int`, optional): Position of the quote in the original message in UTF-16 code units. checklist_task_id (:obj:`int`, optional): Identifier of the specific checklist task to be replied to. .. versionadded:: 22.4 Attributes: message_id (:obj:`int`): Identifier of the message that will be replied to in the current chat, or in the chat :paramref:`chat_id` if it is specified. chat_id (:obj:`int` | :obj:`str`): Optional. If the message to be replied to is from a different chat, |chat_id_channel| Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. allow_sending_without_reply (:obj:`bool`): Optional. |allow_sending_without_reply| Can be used only for replies in the same chat and forum topic. quote (:obj:`str`): Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. quote_parse_mode (:obj:`str`): Optional. Mode for parsing entities in the quote. See :wiki:`formatting options ` for more details. quote_entities (tuple[:class:`telegram.MessageEntity`]): Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of :paramref:`quote_parse_mode`. quote_position (:obj:`int`): Optional. Position of the quote in the original message in UTF-16 code units. checklist_task_id (:obj:`int`): Optional. Identifier of the specific checklist task to be replied to. .. versionadded:: 22.4 )allow_sending_without_replychat_idchecklist_task_idr7quotequote_entitiesquote_parse_modequote_positionNrBr7rprorrrtrsrurqrCc t || ||_||_||_||_||_t||_||_ ||_ |jf|_ |jyrE) rFrGr7rprorrrtr"rsrurqrHrI) rJr7rprorrrtrsrurqrCrKs rLrGzReplyParameters.__init__st J/)29 ;V($) /?CU D .<0A//+ rMrNrOr&rPc|j|}tt|jdt||d<t |||S)rRrsrS)rTtupler!rUrrFrVrWs rLrVzReplyParameters.de_jsonsNt$!& TXX&67 L"  wDc22rMrY)rZr[r\r]r^r#r_rrrlr%r`rrr$rGrarVrbrcs@rLrnrnssDL I.26B#*6<@(,+/*.%S/*&.d^  }  #3- !-!89! $C=X&<383(5/3EV33rMrnN)Fr]collections.abcrtypingrrrtelegram._chatrtelegram._checklistsrtelegram._dicer telegram._files.animationr telegram._files.audior telegram._files.contactr telegram._files.documentr telegram._files.locationrtelegram._files.photosizertelegram._files.stickerrtelegram._files.venuertelegram._files.videortelegram._files.videonotertelegram._files.voicertelegram._games.gamertelegram._giveawayrrtelegram._linkpreviewoptionsrtelegram._messageentityrtelegram._messageoriginrtelegram._paidmediartelegram._payment.invoicertelegram._pollrtelegram._storyrtelegram._telegramobjectrtelegram._utils.argumentparsingr r!r"telegram._utils.defaultvaluer#telegram._utils.typesr$r%telegramr&r(rernrMrLrs&E$11*/'+--/+''/'%8;11--!3bb54n3n3bG3G3Ty3ny3rM