aiogram/CHANGES/724.feature

9 lines
393 B
Gherkin
Raw Normal View History

2021-10-11 01:44:55 +03:00
Implemented new filter named :code:`MagicData(magic_data)` that helps to filter event by data from middlewares or other filters
2021-10-12 01:11:53 +03:00
For example your bot is running with argument named :code:`config` that contains the application config then you can filter event by value from this config:
2021-10-11 01:44:55 +03:00
.. code_block: python3
@router.message(magic_data=F.event.from_user.id == F.config.admin_id)
...