Compare commits

..

1 Commits

Author SHA1 Message Date
vchikalkin
e29229dfe6 feat(youtube): refactor download logic and integrate new API
- Added optional YTDLP_PATH environment variable to configure yt-dlp path.
- Removed old youtube download utility and replaced it with a new API-based approach.
- Implemented new functions to fetch YouTube video download URLs using an external service.
- Introduced yt-dlp integration for fallback download method.
- Created a structured response for video information retrieval.
- Enhanced error handling for video duration and response validation.
2026-02-17 23:31:03 +03:00
4 changed files with 7 additions and 11 deletions

View File

@ -10,9 +10,9 @@ description =
⚡ Simply send the video link, and the bot will download it for you.
short-description =
Bot downloads videos and pictures
Support: @v_dev_support
Donate: { $donateLink }
Download TikTok, Instagram and YouTube videos and images.
For any questions: @v_dev_support
start =

View File

@ -10,9 +10,9 @@ description =
⚡ Просто отправьте ссылку на видео и изображения, и бот сразу скачает его для вас!
short-description =
Бот скачивает видео и изображения
Поддержка: @v_dev_support
Поблагодарить: { $donateLink }
Скачивай видео и изображения из TikTok, Instagram и YouTube.
По всем вопросам: @v_dev_support
start =

View File

@ -1,13 +1,10 @@
import { type Context } from '../context';
import { i18n } from '../i18n';
import { env } from '@/config/env';
import { type Api, type Bot, type RawApi } from 'grammy';
export async function setInfo({ api }: Bot<Context, Api<RawApi>>) {
for (const locale of i18n.locales) {
await api.setMyDescription(i18n.t(locale, 'description'));
await api.setMyShortDescription(
i18n.t(locale, 'short-description', { donateLink: env.DONATE_LINK }),
);
await api.setMyShortDescription(i18n.t(locale, 'short-description'));
}
}

View File

@ -3,7 +3,6 @@ import { z } from 'zod';
export const envSchema = z.object({
BOT_TOKEN: z.string(),
DONATE_LINK: z.string(),
RATE_LIMIT: z
.string()
.transform((value) => Number.parseInt(value, 10))