mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Fix some examples
This commit is contained in:
parent
b309caccd7
commit
5f47c8c499
@ -101,14 +101,14 @@ class GetChatMembers:
|
||||
print(member)
|
||||
|
||||
# Get administrators
|
||||
administrators = list(await app.get_chat_members(
|
||||
chat_id,
|
||||
filter=enums.ChatMembersFilter.ADMINISTRATORS))
|
||||
administrators = []
|
||||
async for m in app.get_chat_members(chat_id, filter=enums.ChatMembersFilter.ADMINISTRATORS):
|
||||
administrators.append(m)
|
||||
|
||||
# Get bots
|
||||
bots = list(await app.get_chat_members(
|
||||
chat_id,
|
||||
filter=enums.ChatMembersFilter.BOTS))
|
||||
bots = []
|
||||
async for m in app.get_chat_members(chat_id, filter=enums.ChatMembersFilter.BOTS):
|
||||
bots.append(m)
|
||||
"""
|
||||
peer = await self.resolve_peer(chat_id)
|
||||
|
||||
|
@ -47,10 +47,10 @@ class ReadChatHistory:
|
||||
.. code-block:: python
|
||||
|
||||
# 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
|
||||
await app.read_history(chat_id, 12345)
|
||||
await app.read_chat_history(chat_id, 12345)
|
||||
"""
|
||||
|
||||
peer = await self.resolve_peer(chat_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user