diff --git a/instruct/handlers.py b/instruct/handlers.py index 5936029..edc4f11 100644 --- a/instruct/handlers.py +++ b/instruct/handlers.py @@ -8,8 +8,10 @@ from utils.texts import ( ) import logging import asyncio +import os from trueconf import Router, Message +from trueconf.types import FSInputFile from utils.states import get_state, set_state, clear_state @@ -20,6 +22,9 @@ logger = logging.getLogger(__name__) router = Router() +# Путь к файлу инструкции Trueconf +TRUECONF_INSTRUCT_PATH = os.path.join(os.path.dirname(__file__), "Проверка_наличия_и_авторизация_на_мобильном_устройстве_Trueconf.docx") + def get_user_cn(user_id: str) -> str | None: """ @@ -96,6 +101,8 @@ async def instruct_router_handler(msg: Message): cn = get_user_cn(user_id) text = INSTRUCT_TRUECONF_WITH_AD(EMOJI_DIGITS, cn) await msg.answer(text, parse_mode="html") + if os.path.isfile(TRUECONF_INSTRUCT_PATH): + await msg.answer_document(FSInputFile(TRUECONF_INSTRUCT_PATH)) elif cmd == "2": log_menu_stats(user_id, "Инструкции", "Почта") set_state(user_id, "INSTRUCT_EMAIL_VIEW") diff --git a/instruct/Проверка_наличия_и_авторизация_на_мобильном_устройстве_Trueconf.docx b/instruct/Проверка_наличия_и_авторизация_на_мобильном_устройстве_Trueconf.docx new file mode 100644 index 0000000..1c82436 Binary files /dev/null and b/instruct/Проверка_наличия_и_авторизация_на_мобильном_устройстве_Trueconf.docx differ