mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
28 lines
611 B
Markdown
28 lines
611 B
Markdown
|
|
# ShippingQueryHandler
|
||
|
|
|
||
|
|
There is base class for callback query handlers.
|
||
|
|
|
||
|
|
## Simple usage:
|
||
|
|
```pyhton3
|
||
|
|
from aiogram.handlers import ShippingQueryHandler
|
||
|
|
|
||
|
|
...
|
||
|
|
|
||
|
|
@router.shipping_query_handler()
|
||
|
|
class MyHandler(ShippingQueryHandler):
|
||
|
|
async def handle(self) -> Any: ...
|
||
|
|
|
||
|
|
```
|
||
|
|
|
||
|
|
## Extension
|
||
|
|
|
||
|
|
This base handler is subclass of [BaseHandler](basics.md#basehandler) with some extensions:
|
||
|
|
|
||
|
|
- `self.from_user` is alias for `self.event.from_user`
|
||
|
|
|
||
|
|
## Related pages
|
||
|
|
|
||
|
|
- [BaseHandler](basics.md#basehandler)
|
||
|
|
- [ShippingQuery](../../api/types/shipping_query.md)
|
||
|
|
- [Router.shipping_query_handler](../router.md#shipping-query)
|