aiogram handler for media groups (also known as albums)
pip install aiogram-media-group
# or
poetry add aiogram-media-group
Minimal usage example:
from aiogram_media_group import media_group_handler
@dp.message(F.media_group_id, F.content_type.in_({'photo'}))
@media_group_handler
async def album_handler(messages: List[types.Message]):
print(messages)
Checkout examples for complete usage examples