2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Fix some examples

This commit is contained in:
Dan 2022-04-25 16:52:04 +02:00
parent b309caccd7
commit 5f47c8c499
2 changed files with 8 additions and 8 deletions

View File

@ -101,14 +101,14 @@ class GetChatMembers:
print(member) print(member)
# Get administrators # Get administrators
administrators = list(await app.get_chat_members( administrators = []
chat_id, async for m in app.get_chat_members(chat_id, filter=enums.ChatMembersFilter.ADMINISTRATORS):
filter=enums.ChatMembersFilter.ADMINISTRATORS)) administrators.append(m)
# Get bots # Get bots
bots = list(await app.get_chat_members( bots = []
chat_id, async for m in app.get_chat_members(chat_id, filter=enums.ChatMembersFilter.BOTS):
filter=enums.ChatMembersFilter.BOTS)) bots.append(m)
""" """
peer = await self.resolve_peer(chat_id) peer = await self.resolve_peer(chat_id)

View File

@ -47,10 +47,10 @@ class ReadChatHistory:
.. code-block:: python .. code-block:: python
# Mark the whole chat as read # Mark the whole chat as read
await app.read_history(chat_id) await app.read_chat_history(chat_id)
# Mark messages as read only up to the given message id # Mark messages as read only up to the given message id
await app.read_history(chat_id, 12345) await app.read_chat_history(chat_id, 12345)
""" """
peer = await self.resolve_peer(chat_id) peer = await self.resolve_peer(chat_id)