mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Backward compatibility - implemented 'func' filter
This commit is contained in:
parent
42913389c0
commit
21908739e9
3 changed files with 23 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import logging
|
|||
import time
|
||||
import typing
|
||||
|
||||
from .filters import Command, ContentTypeFilter, ExceptionsFilter, FiltersFactory, HashTag, Regexp, \
|
||||
from .filters import Command, ContentTypeFilter, ExceptionsFilter, FiltersFactory, FuncFilter, HashTag, Regexp, \
|
||||
RegexpCommandsFilter, StateFilter, Text
|
||||
from .handler import Handler
|
||||
from .middlewares import MiddlewareManager
|
||||
|
|
@ -108,6 +108,9 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
filters_factory.bind(ExceptionsFilter, event_handlers=[
|
||||
self.errors_handlers
|
||||
])
|
||||
filters_factory.bind(FuncFilter, exclude_event_handlers=[
|
||||
self.errors_handlers
|
||||
])
|
||||
|
||||
def __del__(self):
|
||||
self.stop_polling()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue