L i2~dZddlmZmZmZddlmZddlmZddl m Z ddl m Z ddl mZerddlmZGd d eZy ) zRThis module contains the class that represent a Telegram InlineQueryResultsButton.) TYPE_CHECKINGFinalOptional) constants)TelegramObject)de_json_optional)JSONDict) WebAppInfo)Botc eZdZUdZdZ ddddedeedeedeeffd Z e dd ed ed d dffd Z e jjZeeed< e jj$Zeeed<xZS)InlineQueryResultsButtona This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`text`, :attr:`web_app` and :attr:`start_parameter` are equal. Args: text (:obj:`str`): Label text on the button. web_app (:class:`telegram.WebAppInfo`, optional): Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery `_ inside the Web App. start_parameter (:obj:`str`, optional): Deep-linking parameter for the :guilabel:`/start` message sent to the bot when user presses the switch button. :tg-const:`telegram.constants.InlineQueryResultsButtonLimit.MIN_START_PARAMETER_LENGTH` - :tg-const:`telegram.constants.InlineQueryResultsButtonLimit.MAX_START_PARAMETER_LENGTH` characters, only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. Attributes: text (:obj:`str`): Label text on the button. web_app (:class:`telegram.WebAppInfo`): Optional. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method ``web_app_switch_inline_query`` inside the Web App. start_parameter (:obj:`str`): Optional. Deep-linking parameter for the :tg-const:`telegram.constants.InlineQueryResultsButtonLimit.MIN_START_PARAMETER_LENGTH` - :tg-const:`telegram.constants.InlineQueryResultsButtonLimit.MAX_START_PARAMETER_LENGTH` characters, only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed. )start_parametertextweb_appN api_kwargsrrrrct||||_||_||_|j|j|jf|_|j y)Nr)super__init__rrr _id_attrs_freeze)selfrrrr __class__s o/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_inline/inlinequeryresultsbutton.pyrz!InlineQueryResultsButton.__init__PsT J/ .5 .=))T\\43G3GH databotr returnclt|jdt||d<t|||S)z,See :meth:`telegram.TelegramObject.de_json`.r)rr)rgetr rde_json)clsrrrs rr!z InlineQueryResultsButton.de_jsones3+488I+> CPYwDc22rMIN_START_PARAMETER_LENGTHMAX_START_PARAMETER_LENGTH)NN)N)__name__ __module__ __qualname____doc__ __slots__strrr r r classmethodr!rInlineQueryResultsButtonLimitr#rint__annotations__r$ __classcell__)rs@rr r !s*X7I )-)-  *. *%"#  X& *383(5/3E_33 //JJc _//JJc _rr N)r(typingrrrtelegramrtelegram._telegramobjectrtelegram._utils.argumentparsingrtelegram._utils.typesr telegram._webappinfor r r rrr7s6&Y113<*+S_~S_r