localization: add welcome message in English and Russian to enhance user interaction; ensure consistency in error messages
This commit is contained in:
parent
95b1e580f3
commit
e029fd1172
@ -1,4 +1,7 @@
|
|||||||
err_invalid_url = ❌ Invalid URL! Please send a valid TikTok link (e.g., https://vt.tiktok.com/...)
|
err_invalid_url = ❌ Invalid URL! Please send a valid TikTok link (e.g., https://vt.tiktok.com/...)
|
||||||
err_invalid_download_urls = 🔍 Download links not found. The video might be deleted or unavailable
|
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_generic = ⚠️ Something went wrong. Please try again in a few seconds
|
||||||
err_limit_exceeded = 🚫 Too many requests! Please wait before sending the next link
|
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/...)
|
||||||
@ -1,4 +1,7 @@
|
|||||||
err_invalid_url = ❌ Неверная ссылка! Отправьте корректную ссылку TikTok (например: https://vt.tiktok.com/...)
|
err_invalid_url = ❌ Неверная ссылка! Отправьте корректную ссылку TikTok (например: https://vt.tiktok.com/...)
|
||||||
err_invalid_download_urls = 🔍 Не удалось найти ссылки для скачивания. Возможно, видео удалено или недоступно
|
err_invalid_download_urls = 🔍 Не удалось найти ссылки для скачивания. Возможно, видео удалено или недоступно
|
||||||
err_generic = ⚠️ Что-то пошло не так. Попробуйте еще раз через несколько секунд
|
err_generic = ⚠️ Что-то пошло не так. Попробуйте еще раз через несколько секунд
|
||||||
err_limit_exceeded = 🚫 Слишком много запросов! Подождите немного перед следующей ссылкой
|
err_limit_exceeded = 🚫 Слишком много запросов! Подождите немного перед следующей ссылкой
|
||||||
|
|
||||||
|
|
||||||
|
msg_welcome = Добро пожаловать! Я могу скачать для вас видео и изображения из TikTok без водяного знака. Для этого просто отправьте мне ссылку (например: https://vt.tiktok.com/...)
|
||||||
@ -1 +1,2 @@
|
|||||||
export * from './download';
|
export * from './download';
|
||||||
|
export * from './welcome';
|
||||||
|
|||||||
13
apps/bot/src/bot/features/welcome.ts
Normal file
13
apps/bot/src/bot/features/welcome.ts
Normal 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 };
|
||||||
@ -53,6 +53,7 @@ export function createBot({ apiRoot, token }: Parameters_) {
|
|||||||
|
|
||||||
protectedBot.use(autoChatAction(bot.api));
|
protectedBot.use(autoChatAction(bot.api));
|
||||||
protectedBot.use(hydrate());
|
protectedBot.use(hydrate());
|
||||||
|
protectedBot.use(features.welcome);
|
||||||
protectedBot.use(features.download);
|
protectedBot.use(features.download);
|
||||||
|
|
||||||
return bot;
|
return bot;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user