Skip to content

who00152/Alphashare

 
 

Repository files navigation

Alpha Share Bot

Alpha Share Bot
A Powerful File Sharing Bot for Telegram

Python Version GitHub Stars GitHub Forks
GitHub Issues Last Commit Updates Channel

🌟 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.py or .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 /short command 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

Local Deployment

# 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.py

Heroku Deployment

Deploy to Heroku

Watch Deployment Tutorial

Koyeb Deployment

Deploy to Koyeb

Watch Deployment Tutorial

Required Variables

BOT_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

User Commands

/start - Start the bot
/help - Show help message
/about - About the bot

Admin Commands

/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

SUPPORTED_TYPES = [
    "document", "video", "audio", "photo", "voice", "video_note", "animation"
]

Supported Extensions

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

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.106
  • tgcrypto==1.2.5
  • motor==3.3.1
  • dnspython==2.4.2
  • humanize==4.9.0
  • python-dotenv==1.0.0
  • aiofiles==23.2.1
  • pytz==2023.3
  • pymongo==4.5.0
🤝 Contributing

Contributions are welcome! Please submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support
🙏 Credits
Contributors

Last Updated: 2025-03-19 16:42:54 UTC
Made with ❤️ by Adarsh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Procfile 0.1%