mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Rename some enums
This commit is contained in:
parent
bbc109d73e
commit
84f0b3a97a
@ -23,8 +23,8 @@ from .auto_name import AutoName
|
||||
class ChatMembersFilter(AutoName):
|
||||
"""Chat members filter enumeration used in :meth:`~pyrogram.Client.get_chat_members`"""
|
||||
|
||||
ANY = raw.types.ChannelParticipantsSearch
|
||||
"Any kind of member"
|
||||
SEARCH = raw.types.ChannelParticipantsSearch
|
||||
"Search for members"
|
||||
|
||||
BANNED = raw.types.ChannelParticipantsKicked
|
||||
"Banned members"
|
||||
|
@ -23,8 +23,8 @@ from .auto_name import AutoName
|
||||
class MessagesFilter(AutoName):
|
||||
"""Messages filter enumeration used in used in :meth:`~pyrogram.Client.search_messages` and used in :meth:`~pyrogram.Client.search_global`"""
|
||||
|
||||
ANY = raw.types.InputMessagesFilterEmpty
|
||||
"Any kind of message"
|
||||
EMPTY = raw.types.InputMessagesFilterEmpty
|
||||
"Empty filter (any kind of messages)"
|
||||
|
||||
PHOTO = raw.types.InputMessagesFilterPhotos
|
||||
"Photo messages"
|
||||
|
@ -28,7 +28,7 @@ class SearchGlobal:
|
||||
async def search_global(
|
||||
self: "pyrogram.Client",
|
||||
query: str = "",
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.ANY,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
|
||||
limit: int = 0,
|
||||
) -> Optional[AsyncGenerator["types.Message", None]]:
|
||||
"""Search messages globally from all of your chats.
|
||||
|
@ -24,7 +24,7 @@ class SearchGlobalCount:
|
||||
async def search_global_count(
|
||||
self: "pyrogram.Client",
|
||||
query: str = "",
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.ANY,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
|
||||
) -> int:
|
||||
"""Get the count of messages resulting from a global search.
|
||||
|
||||
|
@ -27,7 +27,7 @@ async def get_chunk(
|
||||
client,
|
||||
chat_id: Union[int, str],
|
||||
query: str = "",
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.ANY,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
|
||||
offset: int = 0,
|
||||
limit: int = 100,
|
||||
from_user: Union[int, str] = None
|
||||
@ -64,7 +64,7 @@ class SearchMessages:
|
||||
chat_id: Union[int, str],
|
||||
query: str = "",
|
||||
offset: int = 0,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.ANY,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
|
||||
limit: int = 0,
|
||||
from_user: Union[int, str] = None
|
||||
) -> Optional[AsyncGenerator["types.Message", None]]:
|
||||
|
@ -27,7 +27,7 @@ class SearchMessagesCount:
|
||||
self: "pyrogram.Client",
|
||||
chat_id: Union[int, str],
|
||||
query: str = "",
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.ANY,
|
||||
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
|
||||
from_user: Union[int, str] = None
|
||||
) -> int:
|
||||
"""Get the count of messages resulting from a search inside a chat.
|
||||
|
@ -843,7 +843,7 @@ class Chat(Object):
|
||||
offset: int = 0,
|
||||
limit: int = 200,
|
||||
query: str = "",
|
||||
filter: "enums.ChatMembersFilter" = enums.ChatMembersFilter.ANY
|
||||
filter: "enums.ChatMembersFilter" = enums.ChatMembersFilter.SEARCH
|
||||
) -> List["types.ChatMember"]:
|
||||
"""Bound method *get_members* of :obj:`~pyrogram.types.Chat`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user