A Telegram bot for searching and downloading movies with intelligent caching using Drizzle ORM.
- 🎬 Movie Search: Search movies using inline mode
- 📊 Smart Caching: Caches movies and search results in SQLite database
- ⚙️ Configurable Presentation: Choose between quality-first or all-files view
- 🔗 Direct Downloads: Direct integration with download bot
- 💾 Drizzle ORM: Type-safe database operations with excellent TypeScript support
-
Install dependencies:
pnpm install
-
Set up environment:
cp .env.example .env # Add your BOT_TOKEN to .env -
Initialize database:
pnpm run db:generate pnpm run db:push
-
Run the bot:
# Development pnpm dev # Production pnpm build pnpm start
userId: User's Telegram IDpresentationMode: User's preferred view mode ('quality_first' | 'all_files')
tmdbId: TMDB movie IDtitle,year,poster: Basic movie infotype: Movie type (movie/series)imdbId,imdbVotes: IMDb datainviteLink,plot: Additional infoexternalId: Original API ID
movieId: Reference to Moviedetails: JSON string of detailed movie data (download links, qualities)
- Search: Type
@your_bot_name movie_titlein any chat - Get Details: Click "📋 Get Details" on any result
- Settings: Use
/settingsto change presentation mode - Download: Click any file button to download directly
/start- Welcome message and help/settings- Change presentation mode/help- Show help information
pnpm run db:generate- Generate Drizzle migrationspnpm run db:push- Push schema to databasepnpm run db:studio- Open Drizzle Studio (database GUI)