feat: add URL_FAQ environment variable and update bot localization

- Introduced a new environment variable URL_FAQ for FAQ links.
- Updated Russian localization to include a button for FAQ access.
- Modified the main menu to include a URL button for the FAQ section.
This commit is contained in:
vchikalkin 2025-10-27 13:43:22 +03:00
parent 19b53db5f3
commit 64c9134cc2
4 changed files with 9 additions and 1 deletions

View File

@ -55,6 +55,7 @@ btn-pro = 👑 Pro доступ
btn-subscribe = 👑 Приобрести Pro
btn-pro-info = Мой Pro доступ
btn-open-app = 📱 Открыть приложение
btn-faq = 📖 Инструкция
btn-documents = 📋 Документы
btn-back = ◀️ Назад

View File

@ -18,6 +18,7 @@ export const envSchema = z.object({
.string()
.transform((value) => Number.parseInt(value, 10))
.default('6379'),
URL_FAQ: z.string(),
URL_OFFER: z.string(),
URL_PRIVACY: z.string(),
});

View File

@ -58,6 +58,11 @@ export const mainMenu = new Menu<Context>('main-menu', { autoAnswer: true })
.row()
.text((ctx) => ctx.t('btn-documents'), handleDocuments)
.row()
.url(
(ctx) => ctx.t('btn-faq'),
() => env.URL_FAQ,
)
.row()
.url(
(ctx) => ctx.t('btn-open-app'),
() => {

View File

@ -19,7 +19,8 @@
"REDIS_PORT",
"REDIS_PASSWORD",
"URL_OFFER",
"URL_PRIVACY"
"URL_PRIVACY",
"URL_FAQ"
]
},
"lint": {