A Telegram bot for downloading YouTube videos and audio with multi-language support and user preferences.
- 🔍 Search YouTube videos directly in Telegram
- 📥 Download videos in MP4 format
- 🎵 Download audio in MP3 format
- 🌐 Multi-language support (English and Russian)
- ⚙️ User preferences for default download type
- 🔎 Inline search support
- Clone the repository:
git clone https://github.com/yourusername/YouTubeTG.git
cd YouTubeTG
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env
file with:
BOT_TOKEN=your_telegram_bot_token
YOUTUBE_API_KEY=your_youtube_api_key
DATABASE_URL=your_postgresql_database_url
- Set up the database:
npx prisma generate
npx prisma db push
- Build and start the bot:
npm run build
npm start
/search [query]
- Search for YouTube videos/settings
- Configure bot preferences- Use inline mode by typing
@your_bot_name [query]
- Node.js
- TypeScript
- Grammy (Telegram Bot Framework)
- Prisma (Database ORM)
- PostgreSQL
- YouTube Data API
- FFmpeg (for media processing)
Make sure you have the following installed:
- Node.js (version 18 or higher)
- PostgreSQL
- FFmpeg
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.