diff --git a/BotCode/routers/administration/admin_cmd/secret_cmd.py b/BotCode/routers/administration/admin_cmd/secret_cmd.py index 17e7847..223a83b 100644 --- a/BotCode/routers/administration/admin_cmd/secret_cmd.py +++ b/BotCode/routers/administration/admin_cmd/secret_cmd.py @@ -7,6 +7,9 @@ from BotLibrary import * # Создание роутера и настройка экспорта модулей __all__ = ("router",) + +from routers.msg_default import msg_default + router = Router(name="secret_message_router") log_type = "Admin" @@ -16,12 +19,13 @@ keywords = ["secret", "секрет", "ыускуе", "ctrhtn", # Обработчик команды /secret или сообщений с текстом из списка keywords -@router.message(F.from_user.id.in_(ListId.important_ids), - Command(*keywords, prefix=BotEdit.prefixs, ignore_case=True)) -@router.message(F.from_user.id.in_(ListId.important_ids), F.text.lower().in_(keywords)) +@router.message(F.from_user.id.func(lambda user_id: str(user_id) in DataID.important.keys()), + Command(*keywords, prefix=BotVariables.prefixs, ignore_case=True)) +@router.message(F.from_user.id.func(lambda user_id: str(user_id) in DataID.important.keys()), + F.text.lower().in_(keywords)) async def secret_admin_message(message: types.Message): text = f"Привет, важная персона!" await message.reply(text) await cmd_logginger(message, log_type, text) - return text + await msg_default(message)