Migrating to v2

Migrating from the predecessor

Table Of Content

Why v2?

After taking a break for the past year. Due to personal issues such as exams, I haven't been able to keep up with bug fixes and updates as quickly as I would have liked. Now that I have some more free time, I'm diving back in and taking a fresh look at the codebase. I'm impressed with what's been accomplished so far, but I also see some areas where we can make improvements. Instead of simply patching the existing code, I've decided to rewrite everything from the ground up to make the bot more maintainable and efficient in the long run.

Changes in v2

  • Organized codebase

  • Improved telegram file uploader

  • Use .env file or environment variables for configuration

  • Support for network speed limiting, proxies and parallel connections using mega config file

  • Helper libraries and tools to easily extend functionality with plugins

  • Dropped support for mega.py and moved everything to megatools

Migrating

Heroku

  • Update your Mega-Deployer with "Sync fork" button at your github fork

  • Connect your fork if not already

  • Select main branch and deploy

Local


If you're hosting your bot on a linux system with apt, pacman or dnf as the package manager you can use official installer by running the following command,

curl -sS https://raw.githubusercontent.com/Itz-fork/Mega.nz-Bot/nightly/installer.sh | bash

  • Backup your .env file

  • Remove all the other content related to v1

  • Navigate the folder that you want to save code related to Mega.nz-Bot

  • Create the config file (see guide)

  • Run below commands,

git clone https://github.com/Itz-fork/Mega.nz-Bot ./
cd Mega.nz-Bot
python3 -m venv .venv
source .venv/bin/activate
pip3 install -U -r requirements.txt
python3 -m megadl

# If you get erros such as ModuleNotFoundError, use below command
.venv/bin/python3 -m megadl

Last updated