diff --git a/apps/bot/locales/en.ftl b/apps/bot/locales/en.ftl index 080fd70..8babe48 100644 --- a/apps/bot/locales/en.ftl +++ b/apps/bot/locales/en.ftl @@ -1,3 +1,18 @@ +description = + 🎬 **Universal Video Downloader** + This bot allows you to quickly download videos and images from popular platforms directly to Telegram. + + 🟢 **Currently supported:** + - TikTok (without watermark) + + ⚡ Simply send the video link, and the bot will download it for you. + +short-description = + Download TikTok videos (without watermark). + + For any questions: @vchikalkin + + start = .description = Start the bot diff --git a/apps/bot/locales/ru.ftl b/apps/bot/locales/ru.ftl index 54b941c..6603d99 100644 --- a/apps/bot/locales/ru.ftl +++ b/apps/bot/locales/ru.ftl @@ -1,9 +1,24 @@ +description = + 🎬 **Многофункциональный загрузчик видео и изображения** + Этот бот позволяет быстро скачивать видео и изображения из популярных платформ прямо в Telegram. + + 🟢 **Текущая поддержка:** + - TikTok (без водяного знака) + + ⚡ Просто отправьте ссылку на видео и изображения, и бот сразу скачает его для вас! + +short-description = + Скачивай видео и изображения из TikTok (без водяного знака). + + По всем вопросам: @vchikalkin + + start = .description = Запуск бота err-invalid-url = ❌ Неверная ссылка! Отправьте корректную ссылку TikTok (например: https://vt.tiktok.com/...) -err-invalid-download-urls = 🔍 Не удалось найти ссылки для скачивания. Возможно, видео удалено или недоступно +err-invalid-download-urls = 🔍 Не удалось найти ссылки для скачивания. Возможно, видео и изображения удалено или недоступно err-generic = ⚠️ Что-то пошло не так. Попробуйте еще раз через несколько секунд err-limit-exceeded = 🚫 Слишком много запросов! Подождите немного diff --git a/apps/bot/src/bot/index.ts b/apps/bot/src/bot/index.ts index 201bd6b..6035a4f 100644 --- a/apps/bot/src/bot/index.ts +++ b/apps/bot/src/bot/index.ts @@ -4,6 +4,7 @@ import { type Context } from './context'; import * as features from './features'; import { errorHandler } from './handlers/errors'; import { i18n } from './i18n'; +import { setInfo } from './info'; import * as middlewares from './middlewares'; import { session } from './middlewares'; import { env } from '@/config/env'; @@ -60,6 +61,7 @@ export function createBot({ apiRoot, token }: Parameters_) { protectedBot.use(session()); protectedBot.use(middlewares.updateLogger()); + protectedBot.use(setInfo); protectedBot.use(setCommands); protectedBot.use(autoChatAction(bot.api)); protectedBot.use(hydrate()); diff --git a/apps/bot/src/bot/info/index.ts b/apps/bot/src/bot/info/index.ts new file mode 100644 index 0000000..26a08c8 --- /dev/null +++ b/apps/bot/src/bot/info/index.ts @@ -0,0 +1,9 @@ +import { type Context } from '../context'; +import { type NextFunction } from 'grammy'; + +export async function setInfo(ctx: Context, next: NextFunction) { + await ctx.api.setMyDescription(ctx.t('description')); + await ctx.api.setMyShortDescription(ctx.t('short-description')); + + return next(); +}