Add MediaGroupBuilder for media group construction

Implemented a MediaGroupBuilder class in 'aiogram/utils/media_group.py' to help construct media groups. The class supports addition of different media types (audio, photo, video, document) to the media group with a maximum limit of 10 files. The functionality is demonstrated and usage is documented in 'docs/utils/media_group.rst'. Added related test cases in 'tests/test_utils/test_media_group.py'. This is to streamline and simplify the process of media group creation
This commit is contained in:
Alex Root Junior 2023-09-03 00:23:02 +03:00
parent 8fd110cdd1
commit 86ae64a8e4
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
6 changed files with 509 additions and 1 deletions

View file

@ -3,7 +3,7 @@ from unittest.mock import sentinel
import pytest
from aiogram.methods import GetMe, TelegramMethod
from aiogram.types import User, TelegramObject
from aiogram.types import TelegramObject, User
from tests.mocked_bot import MockedBot