From d646c1eb5042e76e37c6ed11f79733aa8e1405f3 Mon Sep 17 00:00:00 2001 From: Verum Date: Wed, 25 Feb 2026 17:50:23 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=BE=D0=B4=D1=83=D0=BB=D1=8C=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commands/settings/set_description_cmd.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bot/handlers/commands/settings/set_description_cmd.py b/bot/handlers/commands/settings/set_description_cmd.py index ebcca9c..9c024f5 100644 --- a/bot/handlers/commands/settings/set_description_cmd.py +++ b/bot/handlers/commands/settings/set_description_cmd.py @@ -6,8 +6,8 @@ from aiogram.fsm.state import StatesGroup, State from aiogram.types import Message, CallbackQuery from aiogram.utils.i18n import gettext as _ +from bot.filters import IsSuperAdmin from bot.core.bots import BotInfo -from bot.filters import IsOwner from bot.handlers.commands.settings.settings_cmd import settings_keyboard from bot.templates import msg from bot.utils import format_retry_time, status_clear @@ -60,7 +60,7 @@ async def handle_set_bot_description( await bot.set_my_short_description(short_description=description) # Сохраняем текущее значение в BotInfo - BotInfo.short_description = description + BotInfo.widget = description # Сбрасываем состояние FSM await state.clear() @@ -108,9 +108,9 @@ async def handle_set_bot_description( ) -@router.callback_query(F.data.lower() == CMD, IsOwner()) -@router.message(Command(*COMMANDS[CMD], prefix=BotInfo.prefix, ignore_case=True), IsOwner()) -async def settings_cmd( +@router.callback_query(F.data.lower() == CMD, IsSuperAdmin()) +@router.message(Command(*COMMANDS[CMD], prefix=BotInfo.prefix, ignore_case=True), IsSuperAdmin()) +async def set_description_cmd( message: Message | CallbackQuery, state: FSMContext, bot: Bot, @@ -155,7 +155,7 @@ async def settings_cmd( await state.set_state(SetBotDescriptionForm.new_description) -@router.message(SetBotDescriptionForm.new_description, IsOwner()) +@router.message(SetBotDescriptionForm.new_description, IsSuperAdmin()) async def process_new_bot_description( message: Message, state: FSMContext, @@ -171,3 +171,4 @@ async def process_new_bot_description( return await handle_set_bot_description(description, message, state, bot) + BotInfo.description = description