CallbackQueryHandler

class aiogram.handlers.callback_query.CallbackQueryHandler(event: T, **kwargs: Any)[source]

There is base class for callback query handlers.

Example:
from aiogram.handlers import CallbackQueryHandler

...

@router.callback_query()
class MyHandler(CallbackQueryHandler):
    async def handle(self) -> Any: ...
property from_user: User

Is alias for event.from_user

property message: MaybeInaccessibleMessage | None

Is alias for event.message

property callback_data: str | None

Is alias for event.data