search_global_count()#
- Client.search_global_count()#
Get the count of messages resulting from a global search.
If you want to get the actual messages, see
Usable by ✅ Users ❌ Botssearch_global()
.- Parameters:
query (
str
, optional) – Text query string. Use “@” to search for mentions.filter (
MessagesFilter
, optional) – Pass a filter in order to search for specific kind of messages only:chat_list (
int
, optional) – Chat list in which to search messages; Only Main (0) and Archive (1) chat lists are supported. Defaults to (0) Main chat list.chat_type_filter (
ChatType
, optional) – Additional filter for type of the chat (PRIVATE
,GROUP
,CHANNEL
) of the searched messages; pass None to search for messages in all chats.
- Returns:
int
– On success, the messages count is returned.