mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +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,
|
The event builder class or instance to be used,
|
||||||
for instance ``events.NewMessage``.
|
for instance ``events.NewMessage``.
|
||||||
"""
|
"""
|
||||||
async def decorator(f):
|
def decorator(f):
|
||||||
await self.add_event_handler(f, event)
|
self._loop.run_until_complete(self.add_event_handler(f, event))
|
||||||
return f
|
return f
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|
Loading…
Reference in New Issue
Block a user