
    N[il                     0    d dl Z d dl mZmZ  G d d      Zy)    N)rawenumsc            	       R    e Zd Zdej                  j
                  fdddedddefdZy	)
SearchGlobalCount selfzpyrogram.Clientqueryfilterzenums.MessagesFilterreturnc                 L  K   | j                  t        j                  j                  j	                  ||j                         dddt        j                  j                         dd             d{   }t        |d      r|j                  S t        |j                        S 7 1w)aV  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:

        Returns:
            ``int``: On success, the messages count is returned.
        r      )qr
   min_datemax_dateoffset_rateoffset_peer	offset_idlimitNcount)invoker   	functionsmessagesSearchGlobalvaluetypesInputPeerEmptyhasattrr   len)r   r	   r
   rs       `/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/messages/search_global_count.pysearch_global_countz%SearchGlobalCount.search_global_count   s     , ++MM""//||~II446 0 	
 
 1g77Nqzz?"!
s   A.B$0B"12B$N)	__name__
__module____qualname__r   MessagesFilterEMPTYstrintr!        r    r   r      s?     ).)=)=)C)C&#&#&# '&# 
	&#r*   r   )pyrogramr   r   r   r)   r*   r    <module>r,      s   &  '# '#r*   