mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Fix missing async/await for set_slow_mode
This commit is contained in:
parent
45c6df45e9
commit
23789393fe
@ -23,7 +23,7 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetSlowMode(BaseClient):
|
class SetSlowMode(BaseClient):
|
||||||
def set_slow_mode(
|
async def set_slow_mode(
|
||||||
self,
|
self,
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
seconds: int,
|
seconds: int,
|
||||||
@ -47,9 +47,9 @@ class SetSlowMode(BaseClient):
|
|||||||
app.set_slow_mode("pyrogramchat", 60)
|
app.set_slow_mode("pyrogramchat", 60)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.send(
|
await self.send(
|
||||||
functions.channels.ToggleSlowMode(
|
functions.channels.ToggleSlowMode(
|
||||||
channel=self.resolve_peer(chat_id),
|
channel=await self.resolve_peer(chat_id),
|
||||||
seconds=seconds
|
seconds=seconds
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user