mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-02 13:34:51 +00:00
Fix some examples
This commit is contained in:
parent
b309caccd7
commit
5f47c8c499
2 changed files with 8 additions and 8 deletions
|
|
@ -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…
Reference in a new issue