A Discord bot that downloads media from MEGA links, converts them to AAC format, and uploads them to CatBox or Discord.
- Automatically detects MEGA links in Discord messages
- Downloads media files from MEGA links
- Converts media files to AAC format with configurable bitrate
- Uploads converted files to CatBox (default) or Discord
- Supports various input formats (MP4, MP3, AVI, MKV, etc.)
- Modular and extensible architecture
- Python 3.8 or higher
- FFmpeg (must be installed and available in PATH)
- Discord Bot Token
- MEGA account (optional, for better download speeds)
-
Clone the repository:
git clone https://github.com/Darkatse/SimiluBot.git cd SimiluBot -
Install the required Python packages:
pip install -r requirements.txt -
Create a configuration file:
cp config/config.yaml.example config/config.yaml -
Edit the configuration file and add your Discord bot token:
discord: token: "YOUR_DISCORD_BOT_TOKEN_HERE"
The config/config.yaml file contains all the configuration options for the bot:
discord.token: Your Discord bot tokendiscord.command_prefix: Command prefix for the bot (default:!)download.temp_dir: Directory to store temporary filesconversion.default_bitrate: Default AAC bitrate in kbps (default:128)conversion.supported_formats: List of supported input formatsupload.default_service: Default upload service (catboxordiscord)upload.catbox.user_hash: CatBox user hash (optional)logging.level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)logging.file: Log file pathlogging.max_size: Maximum log file size in byteslogging.backup_count: Number of backup log files to keep
-
Start the bot:
python main.py -
In Discord, you can use the following commands:
!mega <url> [bitrate]: Download a file from MEGA and convert it to AAC format!about: Show information about the bot
The bot will also automatically detect and process MEGA links in messages.
SimiluBot/
├── config/
│ └── config.yaml
├── similubot/
│ ├── bot.py # Main Discord bot implementation
│ ├── downloaders/
│ │ └── mega_downloader.py # MEGA download functionality
│ ├── converters/
│ │ └── audio_converter.py # FFmpeg audio conversion
│ ├── uploaders/
│ │ ├── catbox_uploader.py # CatBox upload functionality
│ │ └── discord_uploader.py # Discord upload functionality
│ └── utils/
│ ├── config_manager.py # Configuration management
│ └── logger.py # Logging functionality
├── tests/ # Unit tests
├── .gitignore
├── README.md
├── requirements.txt
└── main.py # Entry point
pytest
The modular architecture makes it easy to add new features:
- Add new downloaders in
similubot/downloaders/ - Add new converters in
similubot/converters/ - Add new uploaders in
similubot/uploaders/
This project is licensed under the MIT License - see the LICENSE file for details.
- discord.py - Discord API wrapper for Python
- mega.py - Python library for the MEGA API
- FFmpeg - Audio/video conversion tool