mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Oops. Include lost files
This commit is contained in:
parent
8a94dde7fb
commit
66f0868f45
16 changed files with 619 additions and 0 deletions
22
docs2/dispatcher/class_based_handlers/index.rst
Normal file
22
docs2/dispatcher/class_based_handlers/index.rst
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
====================
|
||||
Class based handlers
|
||||
====================
|
||||
|
||||
A handler is a async callable which takes a event with contextual data and returns a response.
|
||||
|
||||
In **aiogram** it can be more than just an async function, these allow you to use classes
|
||||
which can be used as Telegram event handlers to structure your event handlers and reuse code by harnessing inheritance and mixins.
|
||||
|
||||
There are some base class based handlers what you need to use in your own handlers:
|
||||
|
||||
.. toctree::
|
||||
|
||||
base
|
||||
callback_query
|
||||
chosen_inline_result
|
||||
error
|
||||
inline_query
|
||||
message
|
||||
poll
|
||||
pre_checkout_query
|
||||
shipping_query
|
||||
Loading…
Add table
Add a link
Reference in a new issue