
A Powerful File Sharing Bot for Telegram
🌟 Features
-
Admin-Only Uploads: Authorized admins can securely upload files with multi-admin support.
-
Universal File Support: Supports images, videos, documents, audio files, and all Telegram-supported files.
-
Unique File Sharing: UUID-based unique links with real-time download tracking.
-
Advanced Statistics: Track downloads, monitor storage usage, and view user engagement metrics.
-
Professional UI: Clean formatting, interactive inline buttons, and real-time progress bars.
-
Security Features: Admin verification, download monitoring, and file access control.
-
Migrate databases without broken links or file errors.
⏱️ Auto Delete Feature: Helps prevent copyright issues!
-
Config:
AUTO_DELETE_TIME -
Set In:
config.pyor.env -
Cleaner UI: Smoother and more user-friendly experience.
-
Bot Keep-Alive Mechanism: Ensures 24/7 uptime for a seamless experience on Koyeb.
-
URL Shortening: Shorten any link using the
/shortcommand with Modiji URL API. -
Privacy Mode: Protects files by preventing users from forwarding or copying them.
-
BATCH UPLOADS : Allows Users To Upload Multiple File At Once And Get A Single Link For It.
🛠️ Installation
# Clone the repository
git clone https://github.com/utkarshdubey2008/AlphaShare.git
# Navigate to directory
cd AlphaShareBot
# Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate # Linux
.\venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run the bot
python main.pyBOT_TOKEN - Get from @BotFather
API_ID - Get from my.telegram.org
API_HASH - Get from my.telegram.org
MONGO_URI - Your MongoDB connection string
DB_CHANNEL_ID - Channel ID for file storage
ADMIN_IDS - List of admin user IDs
MODIJI_API_KEY - Your Modiji URL API key
📚 Commands
/start - Start the bot
/help - Show help message
/about - About the bot
/upload - Upload files (reply to file)
/stats - Get bot statistics
/broadcast - Send message to all users
/delete - Delete a file
/fileinfo - Get file information
/auto_del - Set auto-delete timer
/short <url> - To short the url in your preferred Shortner
/batch - Batch Multiple Files At Once
Supported Types, Extensions, and MIME Types
SUPPORTED_TYPES = [
"document", "video", "audio", "photo", "voice", "video_note", "animation"
]SUPPORTED_EXTENSIONS = [
"pdf", "txt", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "py", "js", "html",
"css", "json", "xml", "yaml", "yml", "zip", "rar", "7z", "tar", "gz", "bz2",
"mp4", "mp3", "m4a", "wav", "avi", "mkv", "flv", "mov", "webm", "3gp", "m4v",
"ogg", "opus", "jpg", "jpeg", "png", "gif", "webp", "bmp", "ico", "apk", "exe",
"msi", "deb", "rpm", "text", "log", "csv", "md", "srt", "sub"
]SUPPORTED_MIME_TYPES = [
"application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/zip", "application/x-rar-compressed", "application/x-7z-compressed", "video/mp4", "audio/mpeg",
"audio/mp4", "image/jpeg", "image/png", "image/gif", "application/vnd.android.package-archive", "application/x-executable"
]📦 Tech Stack
- **Python** - Programming Language - **Pyrogram** - Telegram MTProto API Framework - **MongoDB** - Database - **Motor** - Async MongoDB Driver - **aiofiles** - Async File Operations📋 Dependencies
pyrogram==2.0.106tgcrypto==1.2.5motor==3.3.1dnspython==2.4.2humanize==4.9.0python-dotenv==1.0.0aiofiles==23.2.1pytz==2023.3pymongo==4.5.0
🤝 Contributing
Contributions are welcome! Please submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
📞 Support
- Channel: @Thealphabotz
- Developer: @adarsh2626
🙏 Credits
Last Updated: 2025-03-19 16:42:54 UTC
Made with ❤️ by Adarsh