2.1 Исправление документации

This commit is contained in:
Verum
2025-03-16 02:11:54 +07:00
parent f0a54282c7
commit 471c52b295

View File

@@ -7,8 +7,14 @@ from aiogram import types
__all__ = ("type_chat",)
# Проверка на тип чата
async def type_chat(message: types.Message):
chat_type = message.chat.type
async def type_chat(message: types.Message) -> str:
"""
Преобразует информацию о чате в понятные значения.
:param message: Объект сообщения из aiogram.
:return: Тип чата строкой.
"""
chat_type: str = message.chat.type
if chat_type == "private":
return "Личный"
elif chat_type == "group" or chat_type == "supergroup":