From b7702171a6b865f3b89a84496b07f2034660a6e4 Mon Sep 17 00:00:00 2001 From: nickdu088 <26584779+nickdu088@users.noreply.github.com> Date: Mon, 3 Nov 2025 08:18:33 +1100 Subject: [PATCH] Revise README for Secure File Bot Updated project name and added detailed features, installation instructions, commands, and usage information. --- README.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a1aa956..c7c7ceb 100644 --- a/README.md +++ b/README.md @@ -1 +1,84 @@ -# my_personal_tg_assistant \ No newline at end of file +# 🛡️ Secure File Bot (aiogram) + +A private **Telegram file storage bot** built with **[aiogram 3.x](https://docs.aiogram.dev/)**. +It securely accepts messages, pictures, videos, and documents **only from a specific Telegram user**, +then saves them to a local storage folder. + +You can search, retrieve, delete, and summarize your stored files — all via Telegram commands. + +--- + +## ✨ Features + +✅ **Access Control** — Only a pre-defined `user_id` can use the bot. +✅ **Auto Storage** — Automatically saves text, pictures, videos, and documents locally. +✅ **Supports All Formats** — JPG, PNG, WEBP, MP4, AVI, MOV, and more. +✅ **Search & Retrieve** — Quickly find and fetch any stored file. +✅ **Delete Command** — Remove specific files from storage. +✅ **Overview Command** — View all saved files, sizes, and timestamps. +✅ **Future-Ready** — Easily extendable for OpenAI or 3rd-party API integration. + +--- + +## 🧰 Installation + +### 1. Clone this repo + +```bash +git clone https://github.com/yourusername/secure-file-bot.git +cd secure-file-bot +``` +### 2. Install dependencies +``` +pip install aiogram==3.13 +``` + +### 3. Set up configuration +Open the Python script (secure_file_bot_aiogram.py) and update these constants: +``` +BOT_TOKEN = "YOUR_BOT_TOKEN_HERE" # Get it from @BotFather +AUTHORIZED_USER_ID = 123456789 # Your personal Telegram user ID +STORAGE_DIR = "local_storage" # Folder where files are saved +``` + +## 🚀 Run the Bot +``` +python secure_file_bot_aiogram.py +``` +Once running, open your bot in Telegram and type: +``` +/start +``` +## 💬 Commands +Command Description + +| Command | Description | +| ---------------------------------- | ---------------------------------------- | +| `/start` | Initialize bot and create storage folder | +| `/overview` | Show summary of all stored files | +| `/search ` | Search for a file by name | +| `/get ` | Retrieve a file from search results | +| `/delete ` | Delete matching file(s) | +| *(Send any text, image, or video)* | Automatically saved to local storage | + +## 🧠 How It Works + +* When you send text → stored as .txt +* When you send a picture → auto-detects MIME type (JPG, PNG, WEBP, etc.) +* When you send a video → auto-detects format (MP4, AVI, MOV, etc.) +* When you send a document → saved using its original name and MIME extension +* Everything is organized in your local_storage/ folder + +## 🧩 Example Folder Structure +``` +secure_file_bot_aiogram/ +├── secure_file_bot_aiogram.py +├── requirements.txt +├── README.md +└── local_storage/ + ├── 20251103_140501.txt + ├── 20251103_141012.jpg + ├── 20251103_141223.mp4 + └── ... +``` +