2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Fix missing async/await for set_slow_mode

This commit is contained in:
Dan 2020-05-01 16:37:03 +02:00
parent 45c6df45e9
commit 23789393fe

View File

@ -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
) )
) )