o
    -˜Žj	  ã                   @   s6   d dl mZ d dlZd dlmZmZ G dd„ dƒZdS )é    )ÚOptionalN)ÚrawÚenumsc                   @   sN   e Zd Zdejjdddfdddedddee d	ee d
ee de	fdd„Z
dS )ÚSearchGlobalCountÚ NÚselfzpyrogram.ClientÚqueryÚfilterzenums.MessagesFilterÚchannels_onlyÚgroups_onlyÚ
users_onlyÚreturnc                 Ã   sV   �|   tjjj|| ¡ dddtj ¡ d|||dd�¡I dH }t|dƒr&|j	S t
|jƒS )a‡  Get the count of messages resulting from a global search.

        If you want to get the actual messages, see :meth:`~pyrogram.Client.search_global`.

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

        Parameters:
            query (``str``, *optional*):
                Text query string.
                Use "@" to search for mentions.

            filter (:obj:`~pyrogram.enums.MessagesFilter`, *optional*):
                Pass a filter in order to search for specific kind of messages only:

            channels_only (``bool``, *optional*):
                Pass True to search only in channels.

            groups_only (``bool``, *optional*):
                Pass True to search only in groups.

            users_only (``bool``, *optional*):
                Pass True to search only in users.

        Returns:
            ``int``: On success, the messages count is returned.
        r   é   )Úqr	   Úmin_dateÚmax_dateÚoffset_rateÚoffset_peerÚ	offset_idÚbroadcasts_onlyr   r   ÚlimitNÚcount)Úinvoker   Ú	functionsÚmessagesÚSearchGlobalÚvalueÚtypesÚInputPeerEmptyÚhasattrr   Úlen)r   r   r	   r
   r   r   Úr© r"   új/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/messages/search_global_count.pyÚsearch_global_count   s&   €"õ
ÿ

z%SearchGlobalCount.search_global_count)Ú__name__Ú
__module__Ú__qualname__r   ÚMessagesFilterÚEMPTYÚstrr   ÚboolÚintr$   r"   r"   r"   r#   r      s*    úÿþýüûúùr   )Útypingr   Úpyrogramr   r   r   r"   r"   r"   r#   Ú<module>   s   