localization: add welcome message in English and Russian to enhance user interaction; ensure consistency in error messages

This commit is contained in:
vchikalkin 2025-08-16 14:24:30 +03:00
parent 95b1e580f3
commit e029fd1172
5 changed files with 23 additions and 2 deletions

View File

@ -2,3 +2,6 @@ err_invalid_url = ❌ Invalid URL! Please send a valid TikTok link (e.g., https:
err_invalid_download_urls = 🔍 Download links not found. The video might be deleted or unavailable
err_generic = ⚠️ Something went wrong. Please try again in a few seconds
err_limit_exceeded = 🚫 Too many requests! Please wait before sending the next link
msg_welcome = Welcome! I can download TikTok videos and images for you without watermark. Just send me the link (for example: https://vt.tiktok.com/...)

View File

@ -2,3 +2,6 @@ err_invalid_url = ❌ Неверная ссылка! Отправьте корр
err_invalid_download_urls = 🔍 Не удалось найти ссылки для скачивания. Возможно, видео удалено или недоступно
err_generic = ⚠️ Что-то пошло не так. Попробуйте еще раз через несколько секунд
err_limit_exceeded = 🚫 Слишком много запросов! Подождите немного перед следующей ссылкой
msg_welcome = Добро пожаловать! Я могу скачать для вас видео и изображения из TikTok без водяного знака. Для этого просто отправьте мне ссылку (например: https://vt.tiktok.com/...)

View File

@ -1 +1,2 @@
export * from './download';
export * from './welcome';

View File

@ -0,0 +1,13 @@
import { type Context } from '@/bot/context';
import { logHandle } from '@/bot/helpers/logging';
import { Composer } from 'grammy';
const composer = new Composer<Context>();
const feature = composer.chatType('private');
feature.command('start', logHandle('command-start'), (ctx) => {
return ctx.reply(ctx.t('msg_welcome'));
});
export { composer as welcome };

View File

@ -53,6 +53,7 @@ export function createBot({ apiRoot, token }: Parameters_) {
protectedBot.use(autoChatAction(bot.api));
protectedBot.use(hydrate());
protectedBot.use(features.welcome);
protectedBot.use(features.download);
return bot;