
    YPi#                         d Z ddlZddlmZ ddlmZmZmZ ddl	m
Z
 ddlmZ ddlmZmZ ddlmZmZmZ dd	lmZmZ erdd
lmZ  G d de
      Z G d de
      Z G d de
      Z G d de
      Zy)z=This module contains objects related to Telegram video chats.    N)Sequence)TYPE_CHECKINGOptionalUnion)TelegramObject)User)parse_sequence_argto_timedelta)extract_tzinfo_from_defaultsfrom_timestampget_timedelta_value)JSONDict
TimePeriod)Botc                   <     e Zd ZdZdZdddee   ddf fdZ xZS )VideoChatStarteda  
    This object represents a service message about a video
    chat started in the chat. Currently holds no information.

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatStarted`` in accordance to Bot API 6.0.
     N
api_kwargsr   returnc                F    t         |   |       | j                          y Nr   )super__init___freeze)selfr   	__class__s     I/root/twitch_bot/venv/lib/python3.12/site-packages/telegram/_videochat.pyr   zVideoChatStarted.__init__3   s    J/    )	__name__
__module____qualname____doc__	__slots__r   r   r   __classcell__r   s   @r   r   r   '   s/     I;? hx&8 D  r   r   c                   t     e Zd ZdZdZdddedee   ddf fdZe	de
eej                  f   fd	       Z xZS )
VideoChatEndeda  
    This object represents a service message about a
    video chat ended in the chat.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal, if their
    :attr:`duration` are equal.

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatEnded`` in accordance to Bot API 6.0.

    .. versionchanged:: v22.2
       As part of the migration to representing time periods using ``datetime.timedelta``,
       equality comparison now considers integer durations and equivalent timedeltas as equal.

    Args:
        duration (:obj:`int` | :class:`datetime.timedelta`): Voice chat duration
            in seconds.

            .. versionchanged:: v22.2
                |time-period-input|

    Attributes:
        duration (:obj:`int` | :class:`datetime.timedelta`): Voice chat duration in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|

    )	_durationNr   durationr   r   c                    t         |   |       t        |      | _        | j                  f| _        | j                          y r   )r   r   r
   r)   	_id_attrsr   )r   r*   r   r   s      r   r   zVideoChatEnded.__init__[   s8     	J/(4X(>..*r   c                 0    t        | j                  d      S )Nr*   )	attribute)r   r)   )r   s    r   r*   zVideoChatEnded.durationg   s    "NNj
 	
r   )r    r!   r"   r#   r$   r   r   r   r   propertyr   intdtm	timedeltar*   r%   r&   s   @r   r(   r(   9   sc    > I *.	

 X&	

 

 
%S]] 23 
 
r   r(   c                   r     e Zd ZdZdZdddee   dee   ddf fdZ	e
	 dd	ed
ed   dd f fd       Z xZS )VideoChatParticipantsInviteda  
    This object represents a service message about new members invited to a video chat.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal, if their :attr:`users` are equal.

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatParticipantsInvited`` in accordance to Bot API 6.0.

    Args:
        users (Sequence[:class:`telegram.User`]): New members that were invited to the video chat.

            .. versionchanged:: 20.0
                |sequenceclassargs|

    Attributes:
        users (tuple[:class:`telegram.User`]): New members that were invited to the video chat.

            .. versionchanged:: 20.0
                |tupleclassattrs|

    )usersNr   r5   r   r   c                    t         |   |       t        |      | _        | j                  f| _        | j                          y r   )r   r   r	   r5   r,   r   )r   r5   r   r   s      r   r   z%VideoChatParticipantsInvited.__init__   s7     	J/'9%'@
**r   databotr   c                     | j                  |      }t        j                  |j                  dg       |      |d<   t        |   ||      S ),See :meth:`telegram.TelegramObject.de_json`.r5   r7   r8   )_parse_datar   de_listgetr   de_json)clsr7   r8   r   s      r   r?   z$VideoChatParticipantsInvited.de_json   sE    
 t$TXXgr%:C@WwDc22r   N)r    r!   r"   r#   r$   r   r   r   r   r   classmethodr?   r%   r&   s   @r   r4   r4   n   sq    0 I *.	
~
 X&	

 

 4833"*5/3	'3 3r   r4   c                   ~     e Zd ZdZdZdddej                  dee   ddf fdZ	e
dd	ed
ed   dd f fd       Z xZS )VideoChatScheduledaa  This object represents a service message about a video chat scheduled in the chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`start_date` are equal.

    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatScheduled`` in accordance to Bot API 6.0.

    Args:
        start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
            chat is supposed to be started by a chat administrator

            .. versionchanged:: 20.3
                |datetime_localization|
    Attributes:
        start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
            chat is supposed to be started by a chat administrator

            .. versionchanged:: 20.3
                |datetime_localization|

    )
start_dateNr   rE   r   r   c                x    t         |   |       || _        | j                  f| _        | j	                          y r   )r   r   rE   r,   r   )r   rE   r   r   s      r   r   zVideoChatScheduled.__init__   s3     	J/(2//+r   r7   r8   r   c                     | j                  |      }t        |      }t        |j                  d      |      |d<   t        |   ||      S )r:   rE   )tzinfor;   )r<   r   r   r>   r   r?   )r@   r7   r8   
loc_tzinfor   s       r   r?   zVideoChatScheduled.de_json   sL     t$ 2#6
+DHH\,B:V\wDc22r   rA   )r    r!   r"   r#   r$   r1   datetimer   r   r   rB   r?   r%   r&   s   @r   rD   rD      sl    .  I *.	LL X&	
 
 	38 	3(5/ 	3EY 	3 	3r   rD   )r#   rJ   r1   collections.abcr   typingr   r   r   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr	   r
   telegram._utils.datetimer   r   r   telegram._utils.typesr   r   telegramr   r   r(   r4   rD   r   r   r   <module>rS      sg   & D  $ 1 1 3  L 
 7~ $2
^ 2
j/3> /3d13 13r   