Add support for Telegram Bot API 9.1 (#1704)

* Add support for Telegram Bot API 9.1 features, including checklists, gifts, and new methods like `SendChecklist`, `EditMessageChecklist`, and `GetMyStarBalance`. Update changelog and improve `True` field descriptions.

* Bump API Version

* Refactor profile photo types to use `InputProfilePhotoType` enums instead of hardcoded literals

* Refactor imports and clean up redundant code across methods, types, and webhook server classes
This commit is contained in:
Alex Root Junior 2025-07-05 03:02:44 +03:00 committed by GitHub
parent 77ca49518e
commit f060c08d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 2565 additions and 466 deletions

View file

@ -5,8 +5,8 @@ from asyncio import Transport
from typing import Any, Awaitable, Callable, Dict, Optional, Set, Tuple, cast
from aiohttp import JsonPayload, MultipartWriter, Payload, web
from aiohttp.web_app import Application
from aiohttp.typedefs import Handler
from aiohttp.web_app import Application
from aiohttp.web_middlewares import middleware
from aiogram import Bot, Dispatcher, loggers
@ -111,7 +111,7 @@ class BaseRequestHandler(ABC):
app.on_shutdown.append(self._handle_close)
app.router.add_route("POST", path, self.handle, **kwargs)
async def _handle_close(self, app: Application) -> None:
async def _handle_close(self, *a: Any, **kw: Any) -> None:
await self.close()
@abstractmethod