A simple yet powerful Telegram bot for searching, uploading, and sharing files (like movies or documents) with daily user limits, trending, favorites, and inline search features.
Built with Node.js, Express, MongoDB, and node-telegram-bot-api.
- 🔍 Keyword-based file search (exact, text, regex)
- ⏳ Daily usage limit per user
- 📈 Trending & recent file listings
- ⭐ Add/remove favorites
- 📤 Admin-only file uploads with confirmation
- 🧹 Auto-deletes files after 1 minute
- 🌐 Inline query support
- 📝 Broadcast system for admins
You can access the bot here:
👉 @File_sharing_hd_bot
- Node.js + Express
- MongoDB with Mongoose
- node-telegram-bot-api
- EJS for minimal frontend
- Jest for testing
- GitHub Actions for CI
git clone https://github.com/Aman-20/Telegram.git
cd Telegramnpm ciCreate a file named .env and add:
TELEGRAM_TOKEN=YOUR_TELEGRAM_BOT_TOKEN
MONGODB_URI=YOUR_MONGO_URI
RENDER_EXTERNAL_URL=https://your-app-url.com
ADMIN_IDS=123456789
REQUIRED_CHANNEL=@yourchannel| Variable | Description |
|----------------------|---------------------------------------------------|
| TELEGRAM_TOKEN | Telegram bot token from BotFather |
| MONGODB_URI | MongoDB connection string |
| RENDER_EXTERNAL_URL | Your hosted bot URL (e.g. Render) |
| ADMIN_IDS | Comma-separated Telegram IDs of admins |
| REQUIRED_CHANNEL | Channel users must join before downloading |Telegram/
├── .github/workflows/ # CI configuration
├── tests/ # Jest test files
├── views/ # EJS templates
├── bot.js # Main bot logic
├── package.json
├── README.md
└── LICENSEFor development:
npm run devFor production:
npm start
Visit http://localhost:3000 to see the landing page.npm test- Contributions are welcome!
- Fork the repo
- Create a new branch (git checkout -b feature/your-feature)
- Commit your changes (git commit -m "Add your feature")
- Push to the branch (git push origin feature/your-feature)
- Create a Pull Request ✅
This project is licensed under the MIT License – see the LICENSE file for details.
If you like this project, consider giving it a ⭐ on GitHub!