mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feat: docs
This commit is contained in:
parent
aad8ac8464
commit
6d979ad61e
4 changed files with 17 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ import aiohttp
|
|||
from aiohttp.helpers import sentinel
|
||||
|
||||
from aiogram.utils.deprecated import renamed_argument
|
||||
from .filters import Command, ContentTypeFilter, ExceptionsFilter, FiltersFactory, HashTag, Regexp, \
|
||||
from .filters import Command, ContentTypesFilter, ExceptionsFilter, FiltersFactory, HashTag, Regexp, \
|
||||
RegexpCommandsFilter, StateFilter, Text, IDFilter, AdminFilter, IsReplyFilter, ForwardedMessageFilter
|
||||
from .filters.builtin import IsSenderContact, ChatTypesFilter
|
||||
from .handler import Handler
|
||||
|
|
@ -91,7 +91,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
self.poll_handlers,
|
||||
self.poll_answer_handlers,
|
||||
])
|
||||
filters_factory.bind(ContentTypeFilter, event_handlers=[
|
||||
filters_factory.bind(ContentTypesFilter, event_handlers=[
|
||||
self.message_handlers,
|
||||
self.edited_message_handlers,
|
||||
self.channel_post_handlers,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from .builtin import Command, CommandHelp, CommandPrivacy, CommandSettings, CommandStart, ContentTypeFilter, \
|
||||
from .builtin import Command, CommandHelp, CommandPrivacy, CommandSettings, CommandStart, ContentTypesFilter, \
|
||||
ExceptionsFilter, HashTag, Regexp, RegexpCommandsFilter, StateFilter, \
|
||||
Text, IDFilter, AdminFilter, IsReplyFilter, IsSenderContact, ForwardedMessageFilter
|
||||
Text, IDFilter, AdminFilter, IsReplyFilter, IsSenderContact, ForwardedMessageFilter, \
|
||||
ContentTypesFilter
|
||||
from .factory import FiltersFactory
|
||||
from .filters import AbstractFilter, BoundFilter, Filter, FilterNotPassed, FilterRecord, execute_filter, \
|
||||
check_filters, get_filter_spec, get_filters_spec
|
||||
|
|
@ -13,7 +14,7 @@ __all__ = [
|
|||
'CommandHelp',
|
||||
'CommandPrivacy',
|
||||
'CommandSettings',
|
||||
'ContentTypeFilter',
|
||||
'ContentTypesFilter',
|
||||
'ExceptionsFilter',
|
||||
'HashTag',
|
||||
'Filter',
|
||||
|
|
@ -33,4 +34,6 @@ __all__ = [
|
|||
'execute_filter',
|
||||
'check_filters',
|
||||
'ForwardedMessageFilter',
|
||||
'ContentTypesFilter',
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ class RegexpCommandsFilter(BoundFilter):
|
|||
return False
|
||||
|
||||
|
||||
class ContentTypeFilter(BoundFilter):
|
||||
class ContentTypesFilter(BoundFilter):
|
||||
"""
|
||||
Check message content type
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -149,6 +149,14 @@ ForwardedMessageFilter
|
|||
:show-inheritance:
|
||||
|
||||
|
||||
ChatTypesFilter
|
||||
-------------
|
||||
|
||||
.. autoclass:: aiogram.dispatcher.filters.filters.ChatTypesFilter
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
Making own filters (Custom filters)
|
||||
===================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue