Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyrogram/methods/chats/get_chat_event_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def get_chat_event_log(
limit: int = 0,
filters: "types.ChatEventFilter" = None,
user_ids: List[Union[int, str]] = None
) -> Optional[AsyncGenerator["types.ChatEvent", None]]:
) -> AsyncGenerator["types.ChatEvent"]:
"""Get the actions taken by chat members and administrators in the last 48h.

Only available for supergroups and channels. Requires administrator rights.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/chats/get_chat_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def get_chat_members(
query: str = "",
limit: int = 0,
filter: "enums.ChatMembersFilter" = enums.ChatMembersFilter.SEARCH
) -> Optional[AsyncGenerator["types.ChatMember", None]]:
) -> AsyncGenerator["types.ChatMember"]:
"""Get the members list of a chat.

A chat can be either a basic group, a supergroup or a channel.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/chats/get_dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GetDialogs:
async def get_dialogs(
self: "pyrogram.Client",
limit: int = 0
) -> Optional[AsyncGenerator["types.Dialog", None]]:
) -> AsyncGenerator["types.Dialog"]:
"""Get a user's dialogs sequentially.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/forums/get_forum_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def get_forum_topics(
self: "pyrogram.Client",
chat_id: Union[int, str],
limit: int = 0
) -> Optional[AsyncGenerator["types.ForumTopic", None]]:
) -> AsyncGenerator["types.ForumTopic"]:
"""Get forum topics from a chat.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/forums/get_forum_topics_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GetForumTopicsCount:
async def get_forum_topics_count(
self: "pyrogram.Client",
chat_id: Union[int, str]
) -> Optional[AsyncGenerator["types.ForumTopic", None]]:
) -> int:
"""Get forum topics count from a chat.

.. include:: /_includes/usable-by/users.rst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def get_chat_admin_invite_links(
admin_id: Union[int, str],
revoked: bool = False,
limit: int = 0,
) -> Optional[AsyncGenerator["types.ChatInviteLink", None]]:
) -> AsyncGenerator["types.ChatInviteLink"]:
"""Get the invite links created by an administrator in a chat.

.. note::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def get_chat_invite_link_joiners(
chat_id: Union[int, str],
invite_link: str,
limit: int = 0
) -> Optional[AsyncGenerator["types.ChatJoiner", None]]:
) -> AsyncGenerator["types.ChatJoiner"]:
"""Get the members who joined the chat with the invite link.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/invite_links/get_chat_join_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def get_chat_join_requests(
chat_id: Union[int, str],
limit: int = 0,
query: str = ""
) -> Optional[AsyncGenerator["types.ChatJoiner", None]]:
) -> AsyncGenerator["types.ChatJoiner"]:
"""Get the pending join requests of a chat.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/get_chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def get_chat_history(
min_id: int = 0,
max_id: int = 0,
reverse: Optional[bool] = None
) -> Optional[AsyncGenerator["types.Message", None]]:
) -> AsyncGenerator["types.Message"]
"""Get messages from a chat history.

The messages are returned in reverse chronological order.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/get_discussion_replies.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def get_discussion_replies(
chat_id: Union[int, str],
message_id: int,
limit: int = 0,
) -> Optional[AsyncGenerator["types.Message", None]]:
) -> AsyncGenerator["types.Message"]
"""Get the message replies of a discussion thread.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/search_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def search_global(
groups_only: Optional[bool] = None,
users_only: Optional[bool] = None,
limit: int = 0,
) -> Optional[AsyncGenerator["types.Message", None]]:
) -> AsyncGenerator["types.Message"]:
"""Search messages globally from all of your chats.

If you want to get the messages count only, see :meth:`~pyrogram.Client.search_global_count`.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/messages/search_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def search_messages(
limit: int = 0,
from_user: Union[int, str] = None,
thread_id: int = None
) -> Optional[AsyncGenerator["types.Message", None]]:
) -> AsyncGenerator["types.Message"]
"""Search for text and media messages inside a specific chat.

If you want to get the messages count only, see :meth:`~pyrogram.Client.search_messages_count`.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/users/get_all_stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class GetAllStories:
async def get_all_stories(
self: "pyrogram.Client"
) -> Optional[AsyncGenerator["types.Story", None]]:
) -> AsyncGenerator["types.Story"]:
"""Get all active stories.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/users/get_peer_stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GetPeerStories:
async def get_peer_stories(
self: "pyrogram.Client",
chat_id: Union[int, str]
) -> Optional[AsyncGenerator["types.Story", None]]:
) -> AsyncGenerator["types.Story"]
"""Get all active stories from an user/channel by using user identifiers.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/users/get_stories_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def get_stories_history(
chat_id: int = None,
limit: int = 0,
offset_id: int = 0
) -> Optional[AsyncGenerator["types.Story", None]]:
) -> AsyncGenerator["types.Story"]:
"""Get stories history.

.. include:: /_includes/usable-by/users.rst
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/types/user_and_chats/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ def get_members(
query: str = "",
limit: int = 0,
filter: "enums.ChatMembersFilter" = enums.ChatMembersFilter.SEARCH
) -> Optional[AsyncGenerator["types.ChatMember", None]]:
) -> AsyncGenerator["types.ChatMember"]:
"""Bound method *get_members* of :obj:`~pyrogram.types.Chat`.

Use as a shortcut for:
Expand Down