File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,14 +101,14 @@ async def get_chat_members(
101101 print(member)
102102
103103 # Get administrators
104- administrators = list(await app.get_chat_members(
105- chat_id,
106- filter=enums.ChatMembersFilter.ADMINISTRATORS) )
104+ administrators = []
105+ async for m in app.get_chat_members( chat_id, filter=enums.ChatMembersFilter.ADMINISTRATORS):
106+ administrators.append(m )
107107
108108 # Get bots
109- bots = list(await app.get_chat_members(
110- chat_id,
111- filter=enums.ChatMembersFilter.BOTS) )
109+ bots = []
110+ async for m in app.get_chat_members( chat_id, filter=enums.ChatMembersFilter.BOTS):
111+ bots.append(m )
112112 """
113113 peer = await self .resolve_peer (chat_id )
114114
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ async def read_chat_history(
4747 .. code-block:: python
4848
4949 # Mark the whole chat as read
50- await app.read_history (chat_id)
50+ await app.read_chat_history (chat_id)
5151
5252 # Mark messages as read only up to the given message id
53- await app.read_history (chat_id, 12345)
53+ await app.read_chat_history (chat_id, 12345)
5454 """
5555
5656 peer = await self .resolve_peer (chat_id )
You can’t perform that action at this time.
0 commit comments