mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-03 11:40:11 +03:00
Fix client.on decorator not running
This commit is contained in:
parent
8b0580901a
commit
5cb3a9af36
|
@ -2176,8 +2176,8 @@ class TelegramClient(TelegramBareClient):
|
|||
The event builder class or instance to be used,
|
||||
for instance ``events.NewMessage``.
|
||||
"""
|
||||
async def decorator(f):
|
||||
await self.add_event_handler(f, event)
|
||||
def decorator(f):
|
||||
self._loop.run_until_complete(self.add_event_handler(f, event))
|
||||
return f
|
||||
|
||||
return decorator
|
||||
|
|
Loading…
Reference in New Issue
Block a user