From b1f8fb91cb5f3b904f97e44281c14b24c63af355 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 29 Jul 2025 22:30:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B0=D0=BD=D0=BD=D0=BE=D1=82=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20photo=20=D0=B2=20=5F=5Finit=5F=5F=20ChangeInfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maxapi/methods/change_info.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/maxapi/methods/change_info.py b/maxapi/methods/change_info.py index 18cf3a9..3d21fca 100644 --- a/maxapi/methods/change_info.py +++ b/maxapi/methods/change_info.py @@ -1,5 +1,7 @@ from typing import Any, Dict, List, TYPE_CHECKING, Optional +from ..types.attachments.image import PhotoAttachmentRequestPayload + from ..types.users import User from ..types.command import BotCommand @@ -23,7 +25,7 @@ class ChangeInfo(BaseConnection): name (str, optional): Новое имя бота description (str, optional): Новое описание commands (List[BotCommand], optional): Список команд - photo (Dict[str, Any], optional): Данные фото + photo (PhotoAttachmentRequestPayload, optional): Данные фото """ def __init__( @@ -32,7 +34,7 @@ class ChangeInfo(BaseConnection): name: Optional[str] = None, description: Optional[str] = None, commands: Optional[List[BotCommand]] = None, - photo: Optional[Dict[str, Any]] = None + photo: Optional[PhotoAttachmentRequestPayload] = None ): self.bot = bot self.name = name @@ -60,7 +62,7 @@ class ChangeInfo(BaseConnection): if self.commands: json['commands'] = [command.model_dump() for command in self.commands] if self.photo: - json['photo'] = self.photo + json['photo'] = self.photo.model_dump() return await super().request( method=HTTPMethod.PATCH,