mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Remove filters from class based handlers
This commit is contained in:
parent
acbe1f81b6
commit
647d03b2d4
5 changed files with 1 additions and 16 deletions
|
|
@ -54,10 +54,6 @@ class HandlerObject(CallableMixin):
|
|||
|
||||
if inspect.isclass(self.callback) and issubclass(self.callback, BaseHandler):
|
||||
self.awaitable = True
|
||||
if hasattr(self.callback, "filters"):
|
||||
self.filters.extend(
|
||||
FilterObject(event_filter) for event_filter in self.callback.filters
|
||||
)
|
||||
|
||||
async def check(self, *args: Any, **kwargs: Any) -> Tuple[bool, Dict[str, Any]]:
|
||||
for event_filter in self.filters:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class _HandlerBotMixin(BaseHandlerMixin):
|
|||
|
||||
class BaseHandler(_HandlerBotMixin, ABC):
|
||||
event: TelegramObject
|
||||
filters: Union[List["FilterType"], Tuple["FilterType"]]
|
||||
|
||||
def __init__(self, event: TelegramObject, **kwargs: Any) -> None:
|
||||
self.event = event
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue