{"id":28164153,"url":"https://github.com/bunnysayzz/telegram-storage-bot","last_synced_at":"2026-03-07T02:03:47.425Z","repository":{"id":286513278,"uuid":"961628422","full_name":"bunnysayzz/telegram-storage-bot","owner":"bunnysayzz","description":"A Telegram bot that allows users to store and organize files, media, and documents into categories, and access them anytime.","archived":false,"fork":false,"pushed_at":"2025-04-25T13:41:52.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T11:15:22.138Z","etag":null,"topics":["bot","storage","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/letssaveitbot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bunnysayzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-06T22:30:32.000Z","updated_at":"2025-04-25T13:41:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"99577d16-36ce-4413-8595-99a77cf0421a","html_url":"https://github.com/bunnysayzz/telegram-storage-bot","commit_stats":null,"previous_names":["bunnysayzz/telegram-storage-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bunnysayzz/telegram-storage-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunnysayzz%2Ftelegram-storage-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunnysayzz%2Ftelegram-storage-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunnysayzz%2Ftelegram-storage-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunnysayzz%2Ftelegram-storage-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bunnysayzz","download_url":"https://codeload.github.com/bunnysayzz/telegram-storage-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunnysayzz%2Ftelegram-storage-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","storage","telegram-bot"],"created_at":"2025-05-15T11:15:19.162Z","updated_at":"2026-03-07T02:03:47.384Z","avatar_url":"https://github.com/bunnysayzz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Storage Bot\n\nA Telegram bot that allows users to store and organize files, media, and documents into categories, and access them anytime.\n\n\u003cdiv align=\"center\"\u003e\n\n## 🚀 Try the Bot Now\n\n\u003ca href=\"https://t.me/letssaveitbot\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Telegram-%40letssaveit-blue?style=for-the-badge\u0026logo=telegram\u0026logoColor=white\" alt=\"Telegram @letssaveit\" width=\"250\"/\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n## ✨ Features\n\n- 📁 Store any type of file (photos, videos, documents, audio, voice messages, animations)\n- 🗂️ Organize files into custom categories\n- 🔍 Browse and retrieve files by category\n- ⚙️ Create and delete categories\n- 🔄 MongoDB integration for persistent storage\n- 🛡️ Secure and reliable data storage\n\n## Setup\n\n### Prerequisites\n\n- Python 3.7 or higher\n- A Telegram Bot Token (created via @BotFather)\n- A private Telegram channel where the bot is an admin\n- MongoDB database (Atlas or self-hosted)\n\n### Environment Variables\n\nCreate a `.env` file with the following variables:\n\n```\n# Required\nBOT_TOKEN=your_bot_token\nCHANNEL_ID=your_channel_id\nMONGO_URI=mongodb+srv://username:password@your-cluster.mongodb.net/your-database\n\n# Optional\nTELEGRAM_API_ID=your_api_id\nAPI_HASH=your_api_hash\nCHANNEL_FIRST_MESSAGE_ID=2\n```\n\n## 🐳 Docker Deployment\n\n### Running with Docker\n\n1. Make sure you have Docker installed on your system.\n\n2. Build the Docker image:\n```bash\ndocker build -t telegram-storage-bot .\n```\n\n3. Create a data directory for persistent storage (for exports/backups):\n```bash\nmkdir -p data\n```\n\n4. Run the container:\n```bash\ndocker run -d --name telegram-bot \\\n  -v $(pwd)/data:/app/data \\\n  --env-file .env \\\n  --restart unless-stopped \\\n  telegram-storage-bot\n```\n\n### Using Docker Compose\n\n1. Simply run:\n```bash\ndocker-compose up -d\n```\n\n## 🚀 Deploying to Render\n\n### Option 1: Deploy via Dashboard\n\n1. Create a new Web Service on Render.\n\n2. Connect your GitHub repository.\n\n3. Choose \"Docker\" as the environment.\n\n4. Configure the following environment variables in the Render dashboard:\n   - `BOT_TOKEN=your_bot_token`\n   - `CHANNEL_ID=your_channel_id`\n   - `MONGO_URI=mongodb+srv://username:password@your-cluster.mongodb.net/your-database`\n   - `TELEGRAM_API_ID=your_api_id` (optional)\n   - `API_HASH=your_api_hash` (optional)\n   - `CHANNEL_FIRST_MESSAGE_ID=2` (optional)\n\n5. Set these additional options:\n   - Set the port to `10000`\n   - Enable disk persistence with at least 1GB mounted at `/app/data`\n\n6. Deploy the service.\n\n### Option 2: Deploy via render.yaml\n\n1. Push your code to a GitHub repository.\n\n2. Add your environment variables to the `render.yaml` file (uncomment and fill in the values).\n\n3. Go to the Render dashboard and choose \"Blueprint\" deployment.\n\n4. Connect your repository and Render will automatically configure the service.\n\n## 📋 Data Migration\n\nIf you're upgrading from a previous version that used JSON file storage, you can migrate your data to MongoDB using the included migration script:\n\n```bash\n# Set the MONGO_URI environment variable first\nexport MONGO_URI=mongodb+srv://username:password@your-cluster.mongodb.net/your-database\n\n# Run the migration script\npython migrate_to_mongodb.py path/to/store_bot_db.json\n```\n\n## 📚 Usage\n\nAfter starting the bot with `/start`, you can interact with it using the following commands:\n\n### Available Commands\n\n- `/start` - Initialize the bot and see the welcome message\n- `/menu` - Open the main menu with all available options\n- `/files` - Browse your stored files by category\n- `/categories` - Manage your file categories\n- `/delete` - Delete unwanted categories\n- `/help` - Show detailed help information\n\n### Storing Files\n\n1. **Direct Method**:\n   - Simply send any file (photo, video, document, audio, voice message, animation) to the bot\n   - Choose a category from the list or create a new one\n   - The file will be stored in the selected category\n\n2. **From Categories Menu**:\n   - Use `/categories` command\n   - Select an existing category or create a new one\n   - Send files to add them to the category\n   - Click \"Done\" when finished\n\n3. **From Browsing Interface**:\n   - While browsing files, use the \"Add Files\" button\n   - Send files to add them to the current category\n   - Click \"Done\" when finished or \"Back to Browse\" to return to viewing files\n\n### Browsing and Retrieving Files\n\n1. Use the `/files` command or the \"Browse Files\" button in the main menu\n2. Select a category to view its files\n3. The bot will display files in pages of 10 items with:\n   - File number and name\n   - Navigation controls (Previous/Next page)\n   - \"Add Files\" button to add more files to the current category\n4. Use the pagination controls to navigate between pages if you have more than 10 files\n\n### Managing Categories\n\n- **Creating Categories**:\n  - Use \"Create New Category\" option in the categories menu\n  - Enter a name for your new category\n  - Or, send a file and select \"Create New Category\" when prompted\n\n- **Browsing Categories**:\n  - Use `/files` command to see all categories with file counts\n  - Select a category to view its contents\n\n- **Deleting Categories**:\n  - Use `/delete` command\n  - Select the category you want to delete\n  - Confirmation will be shown when deleted successfully\n\n### Session Management\n\n- Use the \"Done\" button to complete the current operation and return to the main menu\n- Use \"Back\" buttons to navigate to previous screens\n- Send `/start` at any time to reset the conversation\n\n### Important Notes\n\n- Files are securely stored on Telegram servers\n- User data and file references are stored in MongoDB for persistence\n- The bot uses inline buttons for navigation, making it easy to use\n- When deployed on Render's free tier, the bot may experience a slight delay (30-60 seconds) when receiving the first message after a period of inactivity\n- Subsequent messages will be processed quickly once the service is running\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunnysayzz%2Ftelegram-storage-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunnysayzz%2Ftelegram-storage-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunnysayzz%2Ftelegram-storage-bot/lists"}