From 9e38397e85dfecf060b7ac0a6f08c439ac30cb32 Mon Sep 17 00:00:00 2001 From: Verum Date: Wed, 25 Feb 2026 17:49:15 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B5=20=D1=81=D0=BE=D0=BE?= =?UTF-8?q?=D1=82=D0=B2=D0=B5=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B9=20=D0=B2?= =?UTF-8?q?=20=D1=8F=D0=B4=D1=80=D0=B5=20=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/core/bots.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bot/core/bots.py b/bot/core/bots.py index 00f037e..5d682c5 100644 --- a/bot/core/bots.py +++ b/bot/core/bots.py @@ -65,7 +65,7 @@ class BotInfo: last_name: str = None username: str = None description: str = None - short_description: str = None + widget: str = None is_premium: bool = False # Возможности бота @@ -159,11 +159,15 @@ class BotInfo: logger.info("Получение информации о боте", log_type='BOT') bot_info: User = await bots.get_me() + description_obj: BotDescription = await bots.get_my_description() + short_obj: BotShortDescription = await bots.get_my_short_description() cls.id = bot_info.id cls.url = f'tg://user?id={cls.id}' cls.first_name = bot_info.first_name cls.last_name = bot_info.last_name + cls.description = description_obj.description if description_obj else None + cls.widget = short_obj.short_description if short_obj else None cls.username = bot_info.username cls.can_join_groups = getattr(bot_info, 'can_join_groups', False) cls.can_read_all_group_messages = getattr(bot_info, 'can_read_all_group_messages', False) @@ -183,6 +187,8 @@ class BotInfo: 'username': cls.username, 'prefix': cls.prefix, 'is_premium': cls.is_premium, + 'description': cls.description, + 'short_description': cls.widget, 'can_join_groups': cls.can_join_groups, 'can_read_all_group_messages': cls.can_read_all_group_messages, 'supports_inline_queries': cls.supports_inline_queries, @@ -310,6 +316,8 @@ class BotInfo: f"║ • Имя: {cls.first_name} {cls.last_name or ''}".ljust(60) + "║", f"║ • Username: @{cls.username}".ljust(60) + "║", f"║ • ID: {cls.id}".ljust(60) + "║", + f"║ • Description: {cls.description}".ljust(60) + "║", + f"║ • Widget: {cls.widget}".ljust(60) + "║", f"║", f"║ ⚙️ ВОЗМОЖНОСТИ БОТА:", f"║ • Вступать в группы: {'✅' if cls.can_join_groups else '❌'}".ljust(60) + "║", @@ -371,6 +379,7 @@ class BotInfo: setup_webhook: Устанавливать ли webhook (по умолчанию True) """ perm = perm if perm is not None else settings.BOT_EDIT + await BotInfo.info() logger.info("🚀 Процесс запуска бота!", log_type='START')