o
    -˜ŽjÛ	  ã                   @   sH   d dl Z d dlmZmZ d dlZd dlmZ e  e¡ZG dd„ dƒZ	dS )é    N)ÚUnionÚIterable)Úrawc                	   @   s>   e Zd Z	d	dddeeee f deeef defdd„ZdS )
ÚDeleteStoriesNÚselfzpyrogram.ClientÚ	story_idsÚchat_idÚreturnc              
   Ã   sš   �t |tƒ }|rt|ƒn|g}|r|  |¡I dH }n|  d¡I dH }z|  tjjj||d�¡I dH  W dS  t	yL } zt
|ƒ W Y d}~dS d}~ww )aq  Delete one or more story by using story identifiers.

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            story_ids (``int`` | Iterable of ``int``):
                Pass a single story identifier or an iterable of story ids (as integers) to get the content of the
                story themselves.

            chat_id (``int``, *optional*):
                Unique identifier (int) or username (str) of the target channel.
                You can also use channel public link in form of *t.me/<username>* (str).

        Returns:
            `bool`: On success, a True is returned.

        Example:
            .. code-block:: python

                # Delete one story
                await app.delete_stories(12345)

                # Delete more than one story (list of stories)
                await app.delete_stories([12345, 12346])
        NÚme)ÚpeerÚidFT)Ú
isinstanceÚintÚlistÚresolve_peerÚinvoker   Ú	functionsÚstoriesr   Ú	ExceptionÚprint)r   r   r   Úis_iterableÚidsr   Úe© r   úb/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/users/delete_stories.pyÚdelete_stories   s    €ÿý€þzDeleteStories.delete_stories)N)	Ú__name__Ú
__module__Ú__qualname__r   r   r   ÚstrÚboolr   r   r   r   r   r      s    ýÿþ
ýür   )
ÚloggingÚtypingr   r   Úpyrogramr   Ú	getLoggerr   Úlogr   r   r   r   r   Ú<module>   s   
