mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 15:14:52 +00:00
Update read_history.py
This commit is contained in:
parent
eddff4769c
commit
73e8b8c66e
1 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ from ...ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class ReadHistory(BaseClient):
|
class ReadHistory(BaseClient):
|
||||||
def read_history(
|
async def read_history(
|
||||||
self,
|
self,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
max_id: int = 0
|
max_id: int = 0
|
||||||
|
|
@ -53,7 +53,7 @@ class ReadHistory(BaseClient):
|
||||||
app.read_history("pyrogramlounge", 123456)
|
app.read_history("pyrogramlounge", 123456)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
peer = self.resolve_peer(chat_id)
|
peer = await self.resolve_peer(chat_id)
|
||||||
|
|
||||||
if isinstance(peer, types.InputPeerChannel):
|
if isinstance(peer, types.InputPeerChannel):
|
||||||
q = functions.channels.ReadHistory(
|
q = functions.channels.ReadHistory(
|
||||||
|
|
@ -66,6 +66,6 @@ class ReadHistory(BaseClient):
|
||||||
max_id=max_id
|
max_id=max_id
|
||||||
)
|
)
|
||||||
|
|
||||||
self.send(q)
|
await self.send(q)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue