-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiple text filter #176
Conversation
Your ANY filters are redundant because the same result can be achieved by adding multiple registrators Maybe only the contains all of the entries has its place You have the same code in your example @dp.message_handler(text_contains='spam')
@dp.message_handler(text_contains='eggs')
await def my_handler(message):
await foobar() |
@surik00 yes, they may be replaced with a bunch of registrations. Although, my filters make code clearer and more readable while don't break the existing code written using previous filters. Command filter works the same way, and it take place in aiogram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You marked item "I have made corresponding changes to the documentation" as completed but don't add any information to the documentations.
Please add information described in this PR to the docs/source/dispatcher/filters.rst
I'll uncheck documentation mark until you don't update the documentations. |
@JrooTJunior I added the docs in the last 2 commits. Here is the built version of docs for this branch |
Description
Add the multiple text filter as required at #151,
Multiple text filter (aiogram_ru#73126)
.The following patterns are applied for comparison methods:
register_message_handler
Tests are included for all methods. An example of usage was added.
Type of change
Please delete options that are not relevant.
Checklist: