
    ;SiP                     D    d dl mZmZmZ ddlmZ e G d de             Zy)   )EventBuilderEventCommonname_inner_event   )typesc                   8    e Zd ZdZedd       Z G d de      Zy)MessageDeleteda  
    Occurs whenever a message is deleted. Note that this event isn't 100%
    reliable, since Telegram doesn't always notify the clients that a message
    was deleted.

    .. important::

        Telegram **does not** send information about *where* a message
        was deleted if it occurs in private conversations with other users
        or in small group chats, because message IDs are *unique* and you
        can identify the chat with the message ID alone if you saved it
        previously.

        Telethon **does not** save information of where messages occur,
        so it cannot know in which chat a message was deleted (this will
        only work in channels, where the channel ID *is* present).

        This means that the ``chats=`` parameter will not work reliably,
        unless you intend on working with channels and super-groups only.

    Example
        .. code-block:: python

            from telethon import events

            @client.on(events.MessageDeleted)
            async def handler(event):
                # Log all deleted message IDs
                for msg_id in event.deleted_ids:
                    print('Message', msg_id, 'was deleted in', event.chat_id)
    Nc                    t        |t        j                        r| j                  |j                  d       S t        |t        j
                        r:| j                  |j                  t        j                  |j                              S y )N)deleted_idspeer)
isinstancer   UpdateDeleteMessagesEventmessagesUpdateDeleteChannelMessagesPeerChannel
channel_id)clsupdateothersself_ids       c/var/www/OnlineNewsSite/project/venv/lib/python3.12/site-packages/telethon/events/messagedeleted.pybuildzMessageDeleted.build&   s{    fe88999"OO     A AB99"OO&&v'8'89    C    c                        e Zd Z fdZ xZS )MessageDeleted.Eventc                 b    t         |   ||xs dgd          |sd n|d   | _        || _        y )N    )	chat_peermsg_id)super__init__
deleted_idr   )selfr   r   	__class__s      r   r"   zMessageDeleted.Event.__init__4   s?    G(:sA'>   +6d;q>DO*Dr   )__name__
__module____qualname__r"   __classcell__)r%   s   @r   r   r   3   s    	+ 	+r   r   )NN)r&   r'   r(   __doc__classmethodr   r   r    r   r   r	   r	      s'    > 
 
+ +r   r	   N)commonr   r   r   tlr   r	   r,   r   r   <module>r/      s)    ? ?  3+\ 3+ 3+r   