{"id":13988696,"url":"https://github.com/XMYSTERlOUSX/mega-link-downloader-bot","last_synced_at":"2025-07-22T09:31:24.175Z","repository":{"id":37681557,"uuid":"383380111","full_name":"XMYSTERlOUSX/mega-link-downloader-bot","owner":"XMYSTERlOUSX","description":"A telegram bot to download mega.nz links. (made with pyrogram).","archived":true,"fork":false,"pushed_at":"2023-11-15T11:38:50.000Z","size":197,"stargazers_count":267,"open_issues_count":1,"forks_count":301,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-29T07:36:51.126Z","etag":null,"topics":["bot","downloader","mega","mega-links","megacmd","megatools","python","telegram","telegram-bot","uploader"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XMYSTERlOUSX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buymeacoffee":"https://www.buymeacoffee.com/xmysteriousx"}},"created_at":"2021-07-06T07:32:26.000Z","updated_at":"2024-11-12T16:52:27.000Z","dependencies_parsed_at":"2024-01-15T16:52:24.371Z","dependency_job_id":null,"html_url":"https://github.com/XMYSTERlOUSX/mega-link-downloader-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XMYSTERlOUSX/mega-link-downloader-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMYSTERlOUSX%2Fmega-link-downloader-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMYSTERlOUSX%2Fmega-link-downloader-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMYSTERlOUSX%2Fmega-link-downloader-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMYSTERlOUSX%2Fmega-link-downloader-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XMYSTERlOUSX","download_url":"https://codeload.github.com/XMYSTERlOUSX/mega-link-downloader-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMYSTERlOUSX%2Fmega-link-downloader-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266465073,"owners_count":23933055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","downloader","mega","mega-links","megacmd","megatools","python","telegram","telegram-bot","uploader"],"created_at":"2024-08-09T13:01:18.810Z","updated_at":"2025-07-22T09:31:23.843Z","avatar_url":"https://github.com/XMYSTERlOUSX.png","language":"Python","funding_links":["https://www.buymeacoffee.com/xmysteriousx"],"categories":["Python"],"sub_categories":[],"readme":"# Mega Link Downloader Bot\n\u003cp align=\"center\"\u003e\u003cb\u003eThis is a telegram bot to download mega.nz links and return them as files/videos - Made by a 100% noob!\u003c/b\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e(When I mean noob I really mean noob!)\u003c/p\u003e\n\n\u003cb\u003eYou can find a live version of this bot in telegram as [@mega_downloader_robot](https://t.me/mega_downloader_robot)\u003c/b\u003e\n\nCreated with ❤️ by \u003cb\u003e[@xmysteriousx](https://t.me/xmysteriousx)\u003c/b\u003e as a part of [@mysterious_uploader_robot](https://t.me/mysterious_uploader_robot)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://t.me/rezoth_tm\"\u003e\u003cimg src=\"https://img.shields.io/badge/Telegram-Join%20Telegram%20Group-blue.svg?logo=telegram\"\u003e\u003c/a\u003e\u003c/p\u003e\n\nPlease be kind to star and fork this repo!✨😇\n\u003cbr\u003e\n\n---\n\n## Features 💫\n - Mega accounts are not needed!\n - Uses two download engines for downloading links!\n - Speed improved with heroku and vps too!\n - Parallel downloads are supported! (This means many users can use the bot at the same time. 😇)\n - Multitasking is also supported! (This means You (owner) and telegram users who you set as auth users will be able to download multiple links at the same time! 😋)\n - Custom thumbnail support!\n - Custom caption support!\n - Ban unwanted users!\n - See your bot's user count!\n - Broadcast any message to every user of your bot!\n - Ability to download any file under 5GB! (If you provide a pro/business account when deploying there will be no file size limits! 😍)\n\n\u003cb\u003eNotes\u003c/b\u003e :- \n1. Due to telegram API limits I can't upload files which are bigger than 2GB so such files will be spliited and uploaded to you!\n2. Quota limits can occur if you don't provide a pro/business account!\n3. Folder support is not implemented yet but can be added in the near future!\n---\n\n## Deploying Methods\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eDeploying to Heroku\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr\u003e\n\n- Examples of needed bot variables are mentioned below in this readme!\n \n \u003cb\u003eNote\u003c/b\u003e :- Downloads are speed on heroku too! 😍\n\n\u003cbr\u003e\n  \n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/XMYSTERlOUSX/mega-link-downloader-bot)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eDeploying on a VPS\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr\u003e\n\n**Make an Ubuntu 20.04 (LTS) x64 vps!** (All the commands below are given assuming that you use a Ubuntu 20.04 (LTS) x64 vps!)\n- Then execute the below commands. 👇\n```sh  \nsudo apt update\n```\n```sh  \nsudo apt upgrade\n```\n```sh  \napt-get update\n```\n```sh  \napt-get install tmux\n```\n```sh  \napt install meson\n```\n```sh  \nsudo apt-get install libtool libglib2.0-dev gobject-introspection libgmp3-dev nettle-dev asciidoc glib-networking openssl libcurl4-openssl-dev libssl-dev\n```\n```sh  \ngit clone https://github.com/XMYSTERlOUSX/megatools\n```\n```sh  \ncd megatools\n```\n```sh  \nmeson b\n```\n```sh  \nninja -C b\n```\n```sh  \nsudo ninja -C b install\n```\n```sh  \ncd\n```\n```sh  \nwget https://mega.nz/linux/MEGAsync/xUbuntu_20.04/amd64/megacmd-xUbuntu_20.04_amd64.deb\n```\n```sh  \nsudo apt install ./megacmd-xUbuntu_20.04_amd64.deb\n```\n(Ignore the warning \"Download is performed unsandboxed as root as file\" if it is shown...Continue with the other steps now!)\n```sh  \ntmux\n``` \n**Now there are two methods to go further!**\n- Method 1\n  \n  - 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 named `config.py` and paste the whole code in it. \n  - 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.)\n  - Then execute the below commands. 👇\n\n```sh  \ngit clone You_forked_repo_url\n```\n```sh  \napt install python3-pip\n```\n```sh  \napt install ffmpeg\n```\n```sh  \ncd mega-link-downloader-bot\n```\n```sh  \npip3 install -r requirements.txt\n```\n```sh  \npython3 bot.py\n```\nNow If you did everything correctly bot will be running successfully! 🥳\n\n- Method 2\n\n  - Execute the below commands. 👇\n\n```sh  \ngit clone https://github.com/XMYSTERlOUSX/mega-link-downloader-bot\n```\n```sh  \napt install python3-pip\n```\n```sh  \napt install ffmpeg\n```\n```sh  \ncd mega-link-downloader-bot\n```\n```sh  \npip3 install -r requirements.txt\n```\n```sh  \ncp sample_config.py config.py\n```\n```sh  \nnano config.py\n```\n  - Now you will be inside the `config.py` file.\n  - 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.)\n  - (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! 😅)\n  - After editing all with appropriate values as mentioned in the config file press Ctrl + X from your keyboard.\n  - Then press y in your keyboard.\n  - Then execute the below command. 👇\n  \n```sh  \npython3 bot.py\n```\nNow If you did everything correctly, the bot will be running successfully! 🥳\n\u003c/details\u003e\n\n---\n\n## Variables\n- `API_ID` -  Get this value from https://my.telegram.org/apps\n- `API_HASH` - Get This Value from https://my.telegram.org/apps\n- `TG_BOT_TOKEN` - Make a bot from https://t.me/BotFather and enter the token here.\n- `Mega_email` - This is not necessary! Enter your mega email only if you have a mega.nz account with pro/business features. (Used for downloading links with the download engine 'MEGAcmd' which is used in this repository.)\n- `Mega_password` - This is not necessary! Enter your mega password only if you have a mega.nz account with pro/business features. (Used for downloading links with the download engine 'MEGAcmd' which is used in this repository.)\n- `Bot_username` - Your bot's telegram username. (must enter with '@' in the front of the username.)\n- `AUTH_USERS` - Id's of the telegram users, who you want to allow for multitasking - downloading multiple links at once!\n- `OWNER_ID` - Your(owner's) telegram id\n- `REDIS_URI` - Get This Value from http://redislabs.com/try-free (If you don't know how to obtain these values a complete video tutorial is available here:- https://t.me/botzupdate/5)\n- `REDIS_PASS` - Get This Value from http://redislabs.com/try-free (If you don't know how to obtain these values a complete video tutorial is available here:- https://t.me/botzupdate/5)\n\n---\n\n## Bot Commands\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eNormal User Commands\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr\u003e\n\n- `/start` - To check if the bot is alive!\n- `/help` - To get the detailed help guide of using the bot!\n- `/deletethumbnail` - To delete your saved custom thumbnail!\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eAdmin Commands\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr\u003e\n\n- `/mega_ini` - If you are the bot owner (who deploys the bot) and have a pro/business account; In addition to providing your mega credentials in config variables when deploying the bot, you will have to create a mega.ini file for using with the download engine 'megatools' which is used in this repository. Going through this step is essential if you are willing to avoid quota limits when downloading links!\n \n\u003cb\u003eCreate a new text file in notepad or from any other method. Copy the code shown below and paste it in your newly created text file. Replace the values with your actual credentials! Then save the file as \"mega.ini\"\u003c/b\u003e\n\n```sh  \n[Login]\nUsername = your-mega-email-without-inverted-commas\nPassword = your-mega-password-without-inverted-commas\n\n[Network]\n# 1MiB/s\nSpeedLimit = 0\n\n[UI]\nColors = true\n``` \n\n\u003cb\u003eNote :- In the above code change only the \"Username\" and the \"Password\" with your credentials. Keep others exactly as it is and save the file as \"mega.ini\"\u003c/b\u003e\n \nNow send your \"mega.ini\" file to your bot and as a reply to it send the command \u003ccode\u003e/mega_ini\u003c/code\u003e \n\u003cbr\u003e\n \n- `/black` - To ban unwanted users from the bot! \u003cbr\u003e\n(\u003cb\u003eSyntax of sending the commnad to the bot is\u003c/b\u003e:- \u003ccode\u003e/black\u003c/code\u003e \u003ci\u003euserid\u003c/i\u003e)\u003cbr\u003e\n\n- `/unblack` - To unban banned users from the bot! \u003cbr\u003e\n(\u003cb\u003eSyntax of sending the commnad to the bot is\u003c/b\u003e:- \u003ccode\u003e/unblack\u003c/code\u003e \u003ci\u003euserid\u003c/i\u003e)\u003cbr\u003e\n \n- `/lisblack` - To get the telegram id list of banned user's from the bot!\u003cbr\u003e\n \n- `/broadcast` - To broadcast a message to all the users of the bot! \u003cbr\u003e\n(\u003cb\u003eSyntax of sending the commnad to the bot is\u003c/b\u003e:- \u003ccode\u003e/broadcast\u003c/code\u003e \u003ci\u003eas a reply to the message that you want to broadcast!\u003c/i\u003e)\u003cbr\u003e\n\n- `/stats` - To get the total number of users who has used your bot!\n\u003c/details\u003e\n\n---\n\n### Reason for making this open source :-\n\n\u003cb\u003eFor 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. 😇❤️\u003c/b\u003e\n\n---\n\n## Credits, and Thanks to\n\n* [megous](https://github.com/megous) for [megatools](https://megatools.megous.com)\n* [mega.nz](https://mega.nz) for [MEGAcmd](https://github.com/meganz/MEGAcmd)\n* [Odwyersoftware](https://github.com/odwyersoftware) for the [Python library](https://github.com/odwyersoftware/mega.py) of [mega.nz-API](https://mega.nz/API) \n* [ProThinkerGang](https://github.com/ProThinkerGang) for the database module code!\n* [Anjana](https://github.com/AnjanaMadu) for various helps!\n* [Dan](https://github.com/delivrance) for [pyrogram](https://github.com/Pyrogram)\n\n\u003cb\u003eProject written and created by\u003c/b\u003e - [XMYSTERIOUSX](https://github.com/XMYSTERlOUSX)\n\n---\n\n#### LICENSE\n\n- GPLv3\n\n---\n\n#### Buy Me a Coffee\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/xmysteriousx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXMYSTERlOUSX%2Fmega-link-downloader-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXMYSTERlOUSX%2Fmega-link-downloader-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXMYSTERlOUSX%2Fmega-link-downloader-bot/lists"}