This is a telegram bot to download mega.nz links and return them as files/videos - Made by a 100% noob!
(When I mean noob I really mean noob!)
You can find a live version of this bot in telegram as @mega_downloader_robot
Created with ❤️ by @xmysteriousx as a part of @mysterious_uploader_robot
Please be kind to star and fork this repo!✨😇
- Mega accounts are not needed!
- Parellel download are supported! (This means many users can use the bot at the same time. 😇)
- No quota limits will be occured!
- Custom thumbnail support!
- Custom caption support!
- Ability to download any file under 2GB and return as a telegram file!
- Feature of uploading telegram-files / direct-links to your mega account!
- A messgae broadcasting system for users!
- Un-wanted users blacklisting system!
Deploying to Heroku (The Easiest Way)
- Choose Europe as server location when deploying. (Beacuse downloadings will be fast!).
- Examples of needed bot variables are mentioned below in this readme!
Deploy to your VPS
Make a vps (Recommended - Ubuntu 20.04 (LTS) x64 vps from a location/region near to New Zealand) and log in to it.
- Then execute the below commands. 👇
sudo apt update
sudo apt upgrade
apt-get update
apt-get install tmux
tmux
Now there are two methods to go further!
-
Method 1
- Fork my repo. In the repo go inside to the
sample_config.py
and copy all the code in it. In your forked repo, create a file namedconfig.py
and paste the whole code in it. - Then edit the values in it with your values! (Inside your
config.py
file you will see the examples of how to edit the fields.) - Then execute the below commands. 👇
- Fork my repo. In the repo go inside to the
git clone You_forked_repo_url
apt install python3-pip
apt install ffmpeg
cd mega-link-downloader-bot
pip3 install -r requirements.txt
python3 bot.py
Now If you did everything correctly bot will be running successfully! 🥳
-
Method 2
- Execute the below commands. 👇
git clone https://github.com/XMYSTERlOUSX/mega-link-downloader-bot
apt install python3-pip
apt install ffmpeg
cd mega-link-downloader-bot
pip3 install -r requirements.txt
cp sample_config.py config.py
nano config.py
- Now you will be inside the
config.py
file. - Then edit the values in it with your values! (Inside your
config.py
file you will see the examples of how to edit the fields.) - (For pasting letters, copy any value you want and take the curser to the place you want by arrow keys and right click the mouse! 😅)
- After editing all with appropriate values as mentioned in the config file press Ctrl + X from your keyboard.
- Then press y in your keyboard.
- Then execute the below command. 👇
python3 bot.py
Now If you did everything correctly, the bot will be running successfully! 🥳
API_ID
- Get this value from https://my.telegram.org/appsAPI_HASH
- Get This Value from https://my.telegram.org/appsTG_BOT_TOKEN
- Make a bot from https://t.me/BotFather and enter the token here.Mega_email
- This is not necessary! Enter your mega email only if you have a mega.nz account with pro/business features.Mega_password
- This is not necessary! Enter your mega password only if you have a mega.nz account with pro/business features.Bot_username
- Your bot's telegram username. (must enter with '@' in the front of the username)
First of all I am an absolute noob😇🥺 (You can ensure it if you see the code even just once😂)
So when I was going through github in search for finding a mega link downloader bot code or a plugin in pyrogram I found nothing!🥺😞
(Cat userbot and ultroid userbot has a mega link downloader plugin. Also mirror bots have the mega link download feature but none of them were pyrogram.)
(Update :- After my bot many other bots/codes got created! 😂)
I didn't wan't to change the @mysterious_uploader_robot 's whole base to telethon just for the feature of downloading mega links!😑😒 So I decided to make a plugin on my own, based on pyrogram. 🤷♀️
The code was originally made as a plugin for my @mysterious_uploader_robot but thought to make a separate bot for downloading mega.nz links!
For the help of any guy like me in this world who is wondering how to make a bot for downloading mega links, or for whoever that is finding a code to download mega links; thought to make this public. 😇❤️
- AnyDLBot of SpEcHlDe for the base code that I have used for this.
- Odwyersoftware for the awesome Python library of mega.nz-API
- Nexa Bots beacuse I got an example idea of how to add a download progress message, from their forked mega.nz-API code.
- Dan for pyrogram
Project written and created by - XMYSTERIOUSX
- GPLv3