From 154ae6af27e805159e5a0192c0a53bbd5ff3b95d Mon Sep 17 00:00:00 2001 From: Whyverum Date: Mon, 23 Dec 2024 22:02:54 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D1=87=D0=B8=D0=BA=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B?= =?UTF-8?q?=20/exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BotCode/routers/commands/user_cmd/exit_cmd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BotCode/routers/commands/user_cmd/exit_cmd.py b/BotCode/routers/commands/user_cmd/exit_cmd.py index 819f0f1..138d2c8 100644 --- a/BotCode/routers/commands/user_cmd/exit_cmd.py +++ b/BotCode/routers/commands/user_cmd/exit_cmd.py @@ -4,18 +4,20 @@ from aiogram import Router, types, F from aiogram.filters import Command from BotLibrary import * +from routers.msg_default import msg_default -# Создание роутера и экспорта модулей -__all__ = ("router", "exit_cmd", "log_type",) +# Создание роутера, переменных и экспорта модулей +__all__ = ("router", "exit_cmd", "log_type", "description") router = Router(name="exit_router") log_type = "Exit" +description = "Выйти из чата (в разработке)" # Список ключевых слов для команды keywords = ["выход", "ds[j;", "exit", "учше",] # Обработчик команды /exit -@router.message(Command(*keywords, prefix=BotEdit.prefixs, ignore_case=True)) +@router.message(Command(*keywords, prefix=BotVariables.prefixs, ignore_case=True)) @router.message(F.text.lower().in_(keywords)) async def exit_cmd(message: types.Message): try: @@ -26,7 +28,7 @@ async def exit_cmd(message: types.Message): # Активация логгера await cmd_logginger(message, log_type, text) - return text + await msg_default(message) # Проверка на ошибку и ее логирование except Exception as e: