
    > /ix%                     V    d Z ddlZddlmZmZmZmZmZ ddlm	Z	 e G d d             Z
y)z\This module contains the class Defaults, which allows passing default values to Application.    N)AnyDictNoReturnOptionalfinal)UTCc                   d   e Zd ZdZdZddddedddfdee   dee   dee   dee   d	e	j                  d
edee   dee   fdZdefdZdedefdZedeeef   fd       Zedee   fd       Zej*                  dedefd       Zedee   fd       Zej*                  dedefd       Zedee   fd       Zej*                  dedefd       Zedee   fd       Zej*                  dedefd       Zedee   fd       Zej*                  dedefd       Zedee   fd       Zej*                  dedefd       Zede	j                  fd        Z
e
j*                  dedefd!       Z
edefd"       Zej*                  dedefd#       Zedee   fd$       Zej*                  dedefd%       Zy)&Defaultsa  Convenience Class to gather all parameters with a (user defined) default value

    .. seealso:: :wiki:`Architecture Overview <Architecture>`,
        :wiki:`Adding Defaults to Your Bot <Adding-defaults-to-your-bot>`

    .. versionchanged:: 20.0
        Removed the argument and attribute ``timeout``. Specify default timeout behavior for the
        networking backend directly via :class:`telegram.ext.ApplicationBuilder` instead.

    Parameters:
        parse_mode (:obj:`str`, optional): |parse_mode|
        disable_notification (:obj:`bool`, optional): |disable_notification|
        disable_web_page_preview (:obj:`bool`, optional): Disables link previews for links in this
            message.
        allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
        quote (:obj:`bool`, optional): If set to :obj:`True`, the reply is sent as an actual reply
            to the message. If ``reply_to_message_id`` is passed, this parameter will
            be ignored. Default: :obj:`True` in group chats and :obj:`False` in private chats.
        tzinfo (:class:`datetime.tzinfo`, optional): A timezone to be used for all date(time)
            inputs appearing throughout PTB, i.e. if a timezone naive date(time) object is passed
            somewhere, it will be assumed to be in :paramref:`tzinfo`. If the
            :class:`telegram.ext.JobQueue` is used, this must be a timezone provided
            by the ``pytz`` module. Defaults to ``pytz.utc``, if available, and
            :attr:`datetime.timezone.utc` otherwise.
        block (:obj:`bool`, optional): Default setting for the :paramref:`BaseHandler.block`
            parameter
            of handlers and error handlers registered through :meth:`Application.add_handler` and
            :meth:`Application.add_error_handler`. Defaults to :obj:`True`.
        protect_content (:obj:`bool`, optional): |protect_content|

            .. versionadded:: 20.0
    )	_tzinfo_disable_web_page_preview_block_quote_disable_notification_allow_sending_without_reply_parse_mode_api_defaults_protect_contentNT
parse_modedisable_notificationdisable_web_page_previewquotetzinfoblockallow_sending_without_replyprotect_contentc	                     || _         || _        || _        || _        || _        || _        || _        || _        i | _        dD ]   }	t        | |	      }
|
|
| j                  |	<   " y )N)r   explanation_parse_moder   r   r   r   )
r   r   r   r   r   r   r   r   r   getattr)selfr   r   r   r   r   r   r   r   kwargvalues              L/srv/sistema/bot/venv/lib/python3.12/site-packages/telegram/ext/_defaults.py__init__zDefaults.__init__I   s     +55I"9Q&<W)&+(.!0?  
 
	2E D%(E ,1""5)
	2    returnc           
          t        | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  f      S N)	hashr   r   r   r   r   r   r   r   r   s    r"   __hash__zDefaults.__hash__k   sV      **..11%%	
 	
r$   otherc                 f     t        t              rt         fd j                  D              S y)Nc              3   P   K   | ]  }t        |      t        |      k(    y wr'   )r   ).0attrr+   r   s     r"   	<genexpr>z"Defaults.__eq__.<locals>.<genexpr>{   s$     ^twtT*geT.BB^s   #&F)
isinstancer
   all	__slots__)r   r+   s   ``r"   __eq__zDefaults.__eq__y   s%    eX&^t~~^^^r$   c                     | j                   S r'   )r   r)   s    r"   api_defaultszDefaults.api_defaults~   s    !!!r$   c                     | j                   S )z:obj:`str`: Optional. Send Markdown or HTML, if you want Telegram apps to show
        bold, italic, fixed-width text or URLs in your bot's message.
        r   r)   s    r"   r   zDefaults.parse_mode       
 r$   r!   c                     t        d      )NzBYou can not assign a new value to parse_mode after initialization.AttributeErrorr   r!   s     r"   r   zDefaults.parse_mode   s    abbr$   c                     | j                   S )z:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for
        the corresponding parameter of :meth:`telegram.Bot.send_poll`.
        r8   r)   s    r"   r   zDefaults.explanation_parse_mode   r9   r$   c                     t        d      )NzNYou can not assign a new value to explanation_parse_mode after initialization.r;   r=   s     r"   r   zDefaults.explanation_parse_mode   s    \
 	
r$   c                     | j                   S )zt:obj:`bool`: Optional. Sends the message silently. Users will
        receive a notification with no sound.
        )r   r)   s    r"   r   zDefaults.disable_notification   s    
 )))r$   c                     t        d      )NzLYou can not assign a new value to disable_notification after initialization.r;   r=   s     r"   r   zDefaults.disable_notification   s    Z
 	
r$   c                     | j                   S )zY:obj:`bool`: Optional. Disables link previews for links in this
        message.
        )r   r)   s    r"   r   z!Defaults.disable_web_page_preview   s    
 ---r$   c                     t        d      )NzPYou can not assign a new value to disable_web_page_preview after initialization.r;   r=   s     r"   r   z!Defaults.disable_web_page_preview   s    ^
 	
r$   c                     | j                   S )z:obj:`bool`: Optional. Pass :obj:`True`, if the message
        should be sent even if the specified replied-to message is not found.
        )r   r)   s    r"   r   z$Defaults.allow_sending_without_reply   s    
 000r$   c                     t        d      )NzSYou can not assign a new value to allow_sending_without_reply after initialization.r;   r=   s     r"   r   z$Defaults.allow_sending_without_reply   s    a
 	
r$   c                     | j                   S )a  :obj:`bool`: Optional. If set to :obj:`True`, the reply is sent as an actual reply
        to the message. If ``reply_to_message_id`` is passed, this parameter will
        be ignored. Default: :obj:`True` in group chats and :obj:`False` in private chats.
        )r   r)   s    r"   r   zDefaults.quote        {{r$   c                     t        d      )Nz=You can not assign a new value to quote after initialization.r;   r=   s     r"   r   zDefaults.quote       \]]r$   c                     | j                   S )zj:obj:`tzinfo`: A timezone to be used for all date(time) objects appearing
        throughout PTB.
        )r   r)   s    r"   r   zDefaults.tzinfo   s    
 ||r$   c                     t        d      )Nz>You can not assign a new value to tzinfo after initialization.r;   r=   s     r"   r   zDefaults.tzinfo   s    ]^^r$   c                     | j                   S )z:obj:`bool`: Optional. Default setting for the :paramref:`BaseHandler.block` parameter
        of handlers and error handlers registered through :meth:`Application.add_handler` and
        :meth:`Application.add_error_handler`.
        )r   r)   s    r"   r   zDefaults.block   rG   r$   c                     t        d      )Nz=You can not assign a new value to block after initialization.r;   r=   s     r"   r   zDefaults.block   rI   r$   c                     | j                   S )z:obj:`bool`: Optional. Protects the contents of the sent message from forwarding and
        saving.

        .. versionadded:: 20.0
        )r   r)   s    r"   r   zDefaults.protect_content   s     $$$r$   c                     t        d      )NzEYou can't assign a new value to protect_content after initialization.r;   r=   s     r"   r   zDefaults.protect_content   s    S
 	
r$   )__name__
__module____qualname____doc__r3   r   r   strbooldatetimer   r#   intr*   objectr4   propertyr   r   r6   r   setterr   r   r   r   r   r   r   r    r$   r"   r
   r
      s`   B
I %)/337 $"%6:*. 2SM 2 'tn 2 #+4.	 2
 ~ 2  2  2 &.d^ 2 "$ 2D
# 
F t 
 "d38n " "  HSM     c c8 c c       ""
F 
x 
 #

 *htn * *   
& 
X 
 !

 .(4. . . $$
f 
 
 %

 1Xd^ 1 1 !''
 
H 
 (

 x~   \\^6 ^h ^ ^    ]]_F _x _ _ t   \\^6 ^h ^ ^ %$ % % 
V 
 
 
r$   r
   )rS   rV   typingr   r   r   r   r   telegram._utils.datetimer   r
   r[   r$   r"   <module>r^      s3   & c  7 7 ( V
 V
 V
r$   