A simple and efficient Node.js Telegram bot to store files and generate permanent shareable links. Easily upload files via Telegram and share them through unique URLs.
- 📤 Upload and store files via Telegram
- 🔗 Get permanent download/share links
- ⚡ Fast, lightweight, and easy to deploy
- 🔒 Safe and secure file handling
- 🆓 Completely free and open-source
📁 File-Store-Telegram-Bot/
├── 📁 commands/ # All bot command modules
│ ├── commands.js # Possibly a command handler or aggregator
│ ├── disclaimer.js # Handles /disclaimer command
│ ├── settings.js # Handles /settings command
│ └── start.js # Handles /start command
│
├── bot.js # Main bot logic and entry point
├── config.js # Bot configuration (or use .env)
├── package.json # Project metadata and dependencies
├── package-lock.json # Lock file for npm
├── README.md # Project documentation
└── .gitignore # Ignored files for git (e.g., node_modules, .env)
- Node.js v16+ and npm
- Telegram Bot Token from @BotFather
- Optional: A public server or hosting platform (for link access)
- Clone the Repository
git clone https://github.com/yourusername/File-Store-Telegram-Bot.git
cd File-Store-Telegram-Bot- Install Dependencies
npm install- Configure Environment
Create a .env file in the root directory:
BOT_TOKEN=your_telegram_bot_token
MONGO_URI=you_mongoDB_URI
OWNER_ID=Owner_ID (Your Telegram ID)
START_IMAGE_URL=A_image_url- Run the Bot
node bot.jsYou’re up and running! 🎉
You can deploy the bot on:
- VPS (using PM2, forever, or screen)
- Render, Railway, or Heroku (Node buildpack)
- Glitch/Replit (for small-scale usage)
| Variable | Description |
|---|---|
BOT_TOKEN |
Your Telegram bot token |
MONGO_URI |
MongoDB URI |
OWNER_ID |
Bot Owner ID |
START_IMAGE_URL |
A Image Url |
Contributions are welcome! Feel free to fork this repo, make changes, and submit a pull request.
This project is licensed under the MIT License.
If you like this project, give it a ⭐ on GitHub and share it! For help or suggestions, feel