mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Updated pre-commit hook (#681)
* Updated pre-commit config and reformat code * Added changelog
This commit is contained in:
parent
90b3a99039
commit
e356ede5de
20 changed files with 74 additions and 62 deletions
|
|
@ -13,7 +13,7 @@ Event observers
|
|||
.. warning::
|
||||
|
||||
All handlers is always should be an asynchronous.
|
||||
Name of handler function is not important. Event argument name is also is not important but is recommended to don't overlap the name with contextual data in due to function can not accept two arguments with the same name.
|
||||
Name of handler function is not important. Event argument name is also is not important but is recommended to don't overlap the name with contextual data in due to function can not accept two arguments with the same name.
|
||||
|
||||
Here is list of available observers and examples how to register handlers (In examples used only @decorator-style):
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ Update
|
|||
------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
||||
@router.update()
|
||||
async def message_handler(update: types.Update) -> Any: pass
|
||||
|
||||
|
|
@ -39,8 +39,8 @@ Message
|
|||
.. attention::
|
||||
|
||||
Be attentive with filtering this event
|
||||
|
||||
You should expect than this event can be with different set's of attributes in different cases
|
||||
|
||||
You should expect than this event can be with different set's of attributes in different cases
|
||||
|
||||
(For example text, sticker and document is always is different content types of message)
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ Nested routers
|
|||
.. warning::
|
||||
|
||||
Routers by the way can be nested to an another routers with some limitations:
|
||||
|
||||
|
||||
1. Router **CAN NOT** include itself
|
||||
1. Routers **CAN NOT** be used for circular including (router 1 include router 2, router 2 include router 3, router 3 include router 1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue