mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-10 10:49:39 +00:00
Implement dispatching events
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import abc
|
||||
import functools
|
||||
|
||||
from .filters import Filter
|
||||
|
||||
|
||||
class StopPropagation(Exception):
|
||||
"""
|
||||
@@ -48,7 +50,7 @@ class EventBuilder(abc.ABC):
|
||||
class EventHandler:
|
||||
__slots__ = ('_event', '_callback', '_priority', '_filter')
|
||||
|
||||
def __init__(self, event, callback, priority, filter):
|
||||
def __init__(self, event: EventBuilder, callback: callable, priority: int, filter: Filter):
|
||||
self._event = event
|
||||
self._callback = callback
|
||||
self._priority = priority
|
||||
|
Reference in New Issue
Block a user