Update text filter description

This commit is contained in:
Alex Root Junior 2019-11-29 23:24:37 +02:00
parent 40b6a61e70
commit 4e380e424e
2 changed files with 9 additions and 1 deletions

View file

@ -7,6 +7,11 @@ from aiogram.dispatcher.filters import BaseFilter
class Text(BaseFilter):
"""
Is useful for filtering text Message, any CallbackQuery with `data`,
InlineQuery or Poll question.
"""
text: Optional[Union[str, List[str], Set[str], Tuple[str]]] = None
text_contains: Optional[Union[str, List[str], Set[str], Tuple[str]]] = None
text_startswith: Optional[Union[str, List[str], Set[str], Tuple[str]]] = None

View file

@ -1,6 +1,6 @@
# Text
This filter can be used for filter text [Message](../../api/types/message.md),
Is useful for filtering text [Message](../../api/types/message.md),
any [CallbackQuery](../../api/types/callback_query.md) with `data`,
[InlineQuery](../../api/types/inline_query.md) or
[Poll](../../api/types/poll.md) question.
@ -11,6 +11,9 @@ Can be imported:
- `#!python3 from aiogram.dispatcher.filters import Text`
- `#!python3 from aiogram.filters import Text`
Or used from filters factory by passing corresponding arguments to handler registration line
## Specification
| Argument | Type | Description |